@interop/vc-bitstring-status-list 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +27 -0
- package/README.md +117 -0
- package/dist/BitstringStatusList.d.ts +19 -0
- package/dist/BitstringStatusList.d.ts.map +1 -0
- package/dist/BitstringStatusList.js +42 -0
- package/dist/BitstringStatusList.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +347 -0
- package/dist/index.js.map +1 -0
- package/package.json +91 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright (c) 2022-2024, Digital Bazaar, Inc.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
8
|
+
list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
|
12
|
+
and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
* Neither the name of the copyright holder nor the names of its
|
|
15
|
+
contributors may be used to endorse or promote products derived from
|
|
16
|
+
this software without specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
19
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# @interop/vc-bitstring-status-list
|
|
2
|
+
|
|
3
|
+
[](https://github.com/interop-alliance/vc-bitstring-status-list/actions?query=workflow%3ACI)
|
|
4
|
+
[](https://www.npmjs.com/package/@interop/vc-bitstring-status-list)
|
|
5
|
+
|
|
6
|
+
[Verifiable Credential Bitstring Status List](https://github.com/w3c/vc-bitstring-status-list/)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @interop/vc-bitstring-status-list
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Creating a BitstringStatusListCredential
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import {
|
|
20
|
+
BitstringStatusList,
|
|
21
|
+
createCredential,
|
|
22
|
+
VC_BSL_VC_V1_CONTEXT,
|
|
23
|
+
VC_BSL_VC_V2_CONTEXT
|
|
24
|
+
} from '@interop/vc-bitstring-status-list'
|
|
25
|
+
import { documentLoader } from './path-to/document-loader.js'
|
|
26
|
+
import { Ed25519Signature2020 } from '@interop/ed25519-signature'
|
|
27
|
+
import { Ed25519VerificationKey } from '@interop/ed25519-verification-key'
|
|
28
|
+
import { issue } from '@interop/vc'
|
|
29
|
+
|
|
30
|
+
// Issuer Setup
|
|
31
|
+
const key = await Ed25519VerificationKey.from({
|
|
32
|
+
id: 'did:key:z6Mkrjy3khhKz1jPLEwhqYAWNn3xMURog2DdCqjWAmD6anRE#z6Mkrjy3khhKz1jPLEwhqYAWNn3xMURog2DdCqjWAmD6anRE',
|
|
33
|
+
controller: 'did:key:z6Mkrjy3khhKz1jPLEwhqYAWNn3xMURog2DdCqjWAmD6anRE',
|
|
34
|
+
type: 'Ed25519VerificationKey2020',
|
|
35
|
+
publicKeyMultibase: 'z6Mkrjy3khhKz1jPLEwhqYAWNn3xMURog2DdCqjWAmD6anRE',
|
|
36
|
+
privateKeyMultibase:
|
|
37
|
+
'zrv5NrLP4CvUQPGqpoFFCq6ihnEJWF7DpA1r13cxqzeJcSWjbgpXabWbCuHPUUSYhCknd3qWxEfT2ax7cR8TcYr4Dkt'
|
|
38
|
+
})
|
|
39
|
+
const suite = new Ed25519Signature2020({ signer: key.signer() })
|
|
40
|
+
|
|
41
|
+
// Status List Details
|
|
42
|
+
const id = 'https://example.com/credentials/status/3'
|
|
43
|
+
const list = new BitstringStatusList({ length: 100000 })
|
|
44
|
+
const statusPurpose = 'revocation'
|
|
45
|
+
|
|
46
|
+
// Create BitstringStatusListCredential
|
|
47
|
+
const credential = await createCredential({
|
|
48
|
+
id,
|
|
49
|
+
list,
|
|
50
|
+
statusPurpose,
|
|
51
|
+
context: VC_BSL_VC_V2_CONTEXT // OR VC_BSL_VC_V1_CONTEXT for VCDM v1
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
// Create BitstringStatusListCredential Verifiable Credential
|
|
55
|
+
const statusVC = await issue({ credential, suite, documentLoader })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Create a Verifiable Credential which uses a BitstringStatusList
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
// see imports above
|
|
62
|
+
const credential = {
|
|
63
|
+
'@context': [
|
|
64
|
+
'https://www.w3.org/2018/credentials/v1',
|
|
65
|
+
'https://www.w3.org/2018/credentials/examples/v1',
|
|
66
|
+
'https://www.w3.org/ns/credentials/status/v1'
|
|
67
|
+
],
|
|
68
|
+
id: 'https://example.com/credentials/3732',
|
|
69
|
+
type: ['VerifiableCredential', 'UniversityDegreeCredential'],
|
|
70
|
+
issuer: key.controller,
|
|
71
|
+
issuanceDate: '2021-03-10T04:24:12.164Z',
|
|
72
|
+
credentialStatus: {
|
|
73
|
+
id: 'https://example.com/credentials/status/3#94567',
|
|
74
|
+
type: 'BitstringStatusListEntry',
|
|
75
|
+
statusListIndex: '94567',
|
|
76
|
+
statusListCredential: 'https://example.com/credentials/status/3'
|
|
77
|
+
},
|
|
78
|
+
credentialSubject: {
|
|
79
|
+
id: 'did:web:did.actor:bob',
|
|
80
|
+
degree: {
|
|
81
|
+
type: 'BachelorDegree',
|
|
82
|
+
name: 'Bachelor of Science and Arts'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
let verifiableCredential = await issue({
|
|
87
|
+
credential: { ...credential },
|
|
88
|
+
suite,
|
|
89
|
+
documentLoader
|
|
90
|
+
})
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Develop
|
|
94
|
+
|
|
95
|
+
This package uses [pnpm](https://pnpm.io/) and is written in TypeScript.
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
pnpm install # install dependencies
|
|
99
|
+
pnpm run build # compile src/ -> dist/ (with .d.ts)
|
|
100
|
+
pnpm run lint # eslint (flat config)
|
|
101
|
+
pnpm run test-node # vitest (Node)
|
|
102
|
+
pnpm run test-browser # playwright (chromium smoke test)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Run `pnpm exec playwright install --with-deps chromium` once before
|
|
106
|
+
`test-browser`.
|
|
107
|
+
|
|
108
|
+
## Contribute
|
|
109
|
+
|
|
110
|
+
PRs accepted.
|
|
111
|
+
|
|
112
|
+
If editing the Readme, please conform to the
|
|
113
|
+
[standard-readme](https://github.com/RichardLitt/standard-readme) specification.
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
[New BSD License (3-clause)](LICENSE) © Interop Alliance and Digital Bazaar
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { Bitstring } from '@digitalbazaar/bitstring';
|
|
5
|
+
export declare class BitstringStatusList {
|
|
6
|
+
bitstring: Bitstring;
|
|
7
|
+
length: number;
|
|
8
|
+
constructor({ length, buffer }?: {
|
|
9
|
+
length?: number;
|
|
10
|
+
buffer?: Uint8Array;
|
|
11
|
+
});
|
|
12
|
+
setStatus(index: number, status: boolean): void;
|
|
13
|
+
getStatus(index: number): boolean;
|
|
14
|
+
encode(): Promise<string>;
|
|
15
|
+
static decode({ encodedList }: {
|
|
16
|
+
encodedList: string;
|
|
17
|
+
}): Promise<BitstringStatusList>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=BitstringStatusList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitstringStatusList.d.ts","sourceRoot":"","sources":["../src/BitstringStatusList.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEpD,qBAAa,mBAAmB;IAC9B,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;gBAEF,EACV,MAAM,EACN,MAAM,EACP,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,UAAU,CAAA;KAAO;IAKhD,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAO/C,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI3B,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;WAIlB,MAAM,CAAC,EAClB,WAAW,EACZ,EAAE;QACD,WAAW,EAAE,MAAM,CAAA;KACpB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAmBjC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { Bitstring } from '@digitalbazaar/bitstring';
|
|
5
|
+
export class BitstringStatusList {
|
|
6
|
+
bitstring;
|
|
7
|
+
length;
|
|
8
|
+
constructor({ length, buffer } = {}) {
|
|
9
|
+
this.bitstring = new Bitstring({ length, buffer });
|
|
10
|
+
this.length = this.bitstring.length;
|
|
11
|
+
}
|
|
12
|
+
setStatus(index, status) {
|
|
13
|
+
if (typeof status !== 'boolean') {
|
|
14
|
+
throw new TypeError('"status" must be a boolean.');
|
|
15
|
+
}
|
|
16
|
+
return this.bitstring.set(index, status);
|
|
17
|
+
}
|
|
18
|
+
getStatus(index) {
|
|
19
|
+
return this.bitstring.get(index);
|
|
20
|
+
}
|
|
21
|
+
async encode() {
|
|
22
|
+
return 'u' + (await this.bitstring.encodeBits());
|
|
23
|
+
}
|
|
24
|
+
static async decode({ encodedList }) {
|
|
25
|
+
try {
|
|
26
|
+
if (encodedList[0] !== 'u') {
|
|
27
|
+
throw '"encodedList" must start with the character "u".';
|
|
28
|
+
}
|
|
29
|
+
const buffer = await Bitstring.decodeBits({
|
|
30
|
+
encoded: encodedList.slice(1)
|
|
31
|
+
});
|
|
32
|
+
return new BitstringStatusList({ buffer });
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
if (e instanceof Error) {
|
|
36
|
+
throw e;
|
|
37
|
+
}
|
|
38
|
+
throw new Error(`Could not decode encoded status list; reason: ${String(e)}`, { cause: e });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=BitstringStatusList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitstringStatusList.js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C,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;gBACvB,MAAM,CAAC,CAAA;YACT,CAAC;YACD,MAAM,IAAI,KAAK,CACb,iDAAiD,MAAM,CAAC,CAAC,CAAC,EAAE,EAC5D,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAA;QACH,CAAC;IACH,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-2024 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { BitstringStatusList } from './BitstringStatusList.js';
|
|
5
|
+
export declare const VC_BSL_VC_V1_CONTEXT: string[];
|
|
6
|
+
export declare const VC_BSL_VC_V2_CONTEXT: string[];
|
|
7
|
+
export { BitstringStatusList };
|
|
8
|
+
type DocumentLoader = (url: string) => Promise<{
|
|
9
|
+
document: any;
|
|
10
|
+
}>;
|
|
11
|
+
interface BitstringStatusListCredential {
|
|
12
|
+
'@context': string[];
|
|
13
|
+
id: string;
|
|
14
|
+
type: string[];
|
|
15
|
+
credentialSubject: {
|
|
16
|
+
id: string;
|
|
17
|
+
type: string;
|
|
18
|
+
encodedList: string;
|
|
19
|
+
statusPurpose: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface CheckStatusResult {
|
|
23
|
+
verified: boolean;
|
|
24
|
+
results?: any[];
|
|
25
|
+
error?: unknown;
|
|
26
|
+
}
|
|
27
|
+
export declare function createList({ length }: {
|
|
28
|
+
length: number;
|
|
29
|
+
}): Promise<BitstringStatusList>;
|
|
30
|
+
export declare function decodeList({ encodedList }: {
|
|
31
|
+
encodedList: string;
|
|
32
|
+
}): Promise<BitstringStatusList>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a BitstringStatusList Credential.
|
|
35
|
+
*
|
|
36
|
+
* @param {object} options - Options to use.
|
|
37
|
+
* @param {string} options.id - The id for BitstringStatusList Credential.
|
|
38
|
+
* @param {BitstringStatusList} options.list - An instance of
|
|
39
|
+
* BitstringStatusList.
|
|
40
|
+
* @param {string} options.statusPurpose - The purpose of the status entry.
|
|
41
|
+
* @param {Array.string} options.context - The context(s) to use for the
|
|
42
|
+
* credential.
|
|
43
|
+
*
|
|
44
|
+
* @returns {object} The resulting `BitstringStatusList Credential`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createCredential({ id, list, statusPurpose, context }: {
|
|
47
|
+
id: string;
|
|
48
|
+
list: BitstringStatusList;
|
|
49
|
+
statusPurpose: string;
|
|
50
|
+
context?: string[];
|
|
51
|
+
}): Promise<BitstringStatusListCredential>;
|
|
52
|
+
export declare function checkStatus({ credential, documentLoader, suite, verifyBitstringStatusListCredential, verifyMatchingIssuers }?: {
|
|
53
|
+
credential?: any;
|
|
54
|
+
documentLoader?: DocumentLoader;
|
|
55
|
+
suite?: any;
|
|
56
|
+
verifyBitstringStatusListCredential?: boolean;
|
|
57
|
+
verifyMatchingIssuers?: boolean;
|
|
58
|
+
}): Promise<CheckStatusResult>;
|
|
59
|
+
export declare function statusTypeMatches({ credential }?: {
|
|
60
|
+
credential?: any;
|
|
61
|
+
}): boolean;
|
|
62
|
+
export declare function assertBitstringStatusListContext({ credential }?: {
|
|
63
|
+
credential?: any;
|
|
64
|
+
}): void;
|
|
65
|
+
/**
|
|
66
|
+
* Gets the `credentialStatus` of a credential based on its status purpose
|
|
67
|
+
* (`statusPurpose`).
|
|
68
|
+
*
|
|
69
|
+
* @param {object} options - Options to use.
|
|
70
|
+
* @param {object} options.credential - A VC.
|
|
71
|
+
* @param {'revocation'|'suspension'} options.statusPurpose - A
|
|
72
|
+
* `statusPurpose`.
|
|
73
|
+
*
|
|
74
|
+
* @throws If the `credentialStatus` is invalid or missing.
|
|
75
|
+
*
|
|
76
|
+
* @returns {object} The resulting `credentialStatus`.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getCredentialStatus({ credential, statusPurpose }?: {
|
|
79
|
+
credential?: any;
|
|
80
|
+
statusPurpose?: string;
|
|
81
|
+
}): any;
|
|
82
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAQ9D,eAAO,MAAM,oBAAoB,UAA6C,CAAA;AAC9E,eAAO,MAAM,oBAAoB,UAAsB,CAAA;AAEvD,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAE9B,KAAK,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,CAAC,CAAA;AAEjE,UAAU,6BAA6B;IACrC,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,iBAAiB,EAAE;QACjB,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,wBAAsB,UAAU,CAAC,EAC/B,MAAM,EACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAE/B;AAED,wBAAsB,UAAU,CAAC,EAC/B,WAAW,EACZ,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;CACpB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAE/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,EAAE,EACF,IAAI,EACJ,aAAa,EACb,OAAO,EACR,EAAE;IACD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,mBAAmB,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAmCzC;AAED,wBAAsB,WAAW,CAAC,EAChC,UAAU,EACV,cAAc,EACd,KAAK,EACL,mCAA0C,EAC1C,qBAA4B,EAC7B,GAAE;IACD,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,mCAAmC,CAAC,EAAE,OAAO,CAAA;IAC7C,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAC3B,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAiBlC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACX,GAAE;IAAE,UAAU,CAAC,EAAE,GAAG,CAAA;CAAO,GAAG,OAAO,CA6BrC;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,UAAU,EACX,GAAE;IACD,UAAU,CAAC,EAAE,GAAG,CAAA;CACZ,GAAG,IAAI,CAkBZ;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,aAAa,EACd,GAAE;IACD,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,GAAG,CAmCX"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-2024 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { BitstringStatusList } from './BitstringStatusList.js';
|
|
5
|
+
import { CONTEXT_URL as VC_BSL_V1_CONTEXT_URL } from '@digitalbazaar/vc-bitstring-status-list-context';
|
|
6
|
+
import { named as vcNamedContexts } from '@digitalbazaar/credentials-context';
|
|
7
|
+
import { verifyCredential as vcVerifyCredential } from '@interop/vc';
|
|
8
|
+
const VC_V1_CONTEXT_URL = vcNamedContexts.get('v1').id;
|
|
9
|
+
const VC_V2_CONTEXT_URL = vcNamedContexts.get('v2').id;
|
|
10
|
+
export const VC_BSL_VC_V1_CONTEXT = [VC_V1_CONTEXT_URL, VC_BSL_V1_CONTEXT_URL];
|
|
11
|
+
export const VC_BSL_VC_V2_CONTEXT = [VC_V2_CONTEXT_URL];
|
|
12
|
+
export { BitstringStatusList };
|
|
13
|
+
export async function createList({ length }) {
|
|
14
|
+
return new BitstringStatusList({ length });
|
|
15
|
+
}
|
|
16
|
+
export async function decodeList({ encodedList }) {
|
|
17
|
+
return BitstringStatusList.decode({ encodedList });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a BitstringStatusList Credential.
|
|
21
|
+
*
|
|
22
|
+
* @param {object} options - Options to use.
|
|
23
|
+
* @param {string} options.id - The id for BitstringStatusList Credential.
|
|
24
|
+
* @param {BitstringStatusList} options.list - An instance of
|
|
25
|
+
* BitstringStatusList.
|
|
26
|
+
* @param {string} options.statusPurpose - The purpose of the status entry.
|
|
27
|
+
* @param {Array.string} options.context - The context(s) to use for the
|
|
28
|
+
* credential.
|
|
29
|
+
*
|
|
30
|
+
* @returns {object} The resulting `BitstringStatusList Credential`.
|
|
31
|
+
*/
|
|
32
|
+
export async function createCredential({ id, list, statusPurpose, context }) {
|
|
33
|
+
if (!(id && typeof id === 'string')) {
|
|
34
|
+
throw new TypeError('"id" is required.');
|
|
35
|
+
}
|
|
36
|
+
if (!(list && typeof list.encode === 'function')) {
|
|
37
|
+
throw new TypeError('"list" is required.');
|
|
38
|
+
}
|
|
39
|
+
if (!(statusPurpose && typeof statusPurpose === 'string')) {
|
|
40
|
+
throw new TypeError('"statusPurpose" is required.');
|
|
41
|
+
}
|
|
42
|
+
if (!context) {
|
|
43
|
+
context = [...VC_BSL_VC_V2_CONTEXT];
|
|
44
|
+
}
|
|
45
|
+
else if (!(context.every((e, i) => e === VC_BSL_VC_V1_CONTEXT[i]) ||
|
|
46
|
+
context.every((e, i) => e === VC_BSL_VC_V2_CONTEXT[i]))) {
|
|
47
|
+
throw new TypeError(`"context" must be either "${VC_BSL_VC_V1_CONTEXT}" ` +
|
|
48
|
+
`or "${VC_BSL_VC_V2_CONTEXT}".`);
|
|
49
|
+
}
|
|
50
|
+
const encodedList = await list.encode();
|
|
51
|
+
return {
|
|
52
|
+
'@context': context,
|
|
53
|
+
id,
|
|
54
|
+
type: ['VerifiableCredential', 'BitstringStatusListCredential'],
|
|
55
|
+
credentialSubject: {
|
|
56
|
+
id: `${id}#list`,
|
|
57
|
+
type: 'BitstringStatusList',
|
|
58
|
+
encodedList,
|
|
59
|
+
statusPurpose
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export async function checkStatus({ credential, documentLoader, suite, verifyBitstringStatusListCredential = true, verifyMatchingIssuers = true } = {}) {
|
|
64
|
+
let result;
|
|
65
|
+
try {
|
|
66
|
+
result = await _checkStatuses({
|
|
67
|
+
credential,
|
|
68
|
+
documentLoader,
|
|
69
|
+
suite,
|
|
70
|
+
verifyBitstringStatusListCredential,
|
|
71
|
+
verifyMatchingIssuers
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
result = {
|
|
76
|
+
verified: false,
|
|
77
|
+
error
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
export function statusTypeMatches({ credential } = {}) {
|
|
83
|
+
_isObject({ credential });
|
|
84
|
+
// check for expected contexts
|
|
85
|
+
const { '@context': contexts } = credential;
|
|
86
|
+
if (!Array.isArray(contexts)) {
|
|
87
|
+
throw new TypeError('"@context" must be an array.');
|
|
88
|
+
}
|
|
89
|
+
const isVC2 = contexts[0] === VC_V2_CONTEXT_URL;
|
|
90
|
+
if (!(isVC2 || contexts[0] === VC_V1_CONTEXT_URL)) {
|
|
91
|
+
throw new TypeError(`The first "@context" value must be "${VC_V1_CONTEXT_URL}" or ` +
|
|
92
|
+
`"${VC_V2_CONTEXT_URL}".`);
|
|
93
|
+
}
|
|
94
|
+
const { credentialStatus } = credential;
|
|
95
|
+
if (!credentialStatus) {
|
|
96
|
+
// no status; no match
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if (typeof credentialStatus !== 'object') {
|
|
100
|
+
// bad status
|
|
101
|
+
throw new Error('"credentialStatus" is invalid.');
|
|
102
|
+
}
|
|
103
|
+
if (!(isVC2 || contexts.includes(VC_BSL_V1_CONTEXT_URL))) {
|
|
104
|
+
// required context not present, no match
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const credentialStatuses = _getStatuses({ credential });
|
|
108
|
+
return credentialStatuses.length > 0;
|
|
109
|
+
}
|
|
110
|
+
export function assertBitstringStatusListContext({ credential } = {}) {
|
|
111
|
+
_isObject({ credential });
|
|
112
|
+
// check for expected contexts
|
|
113
|
+
const { '@context': contexts } = credential;
|
|
114
|
+
if (!Array.isArray(contexts)) {
|
|
115
|
+
throw new TypeError('"@context" must be an array.');
|
|
116
|
+
}
|
|
117
|
+
if (contexts[0] === VC_V2_CONTEXT_URL) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (contexts[0] !== VC_V1_CONTEXT_URL) {
|
|
121
|
+
throw new TypeError(`The first "@context" value must be "${VC_V1_CONTEXT_URL}".`);
|
|
122
|
+
}
|
|
123
|
+
if (!contexts.includes(VC_BSL_V1_CONTEXT_URL)) {
|
|
124
|
+
throw new TypeError(`"@context" must include "${VC_BSL_V1_CONTEXT_URL}".`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Gets the `credentialStatus` of a credential based on its status purpose
|
|
129
|
+
* (`statusPurpose`).
|
|
130
|
+
*
|
|
131
|
+
* @param {object} options - Options to use.
|
|
132
|
+
* @param {object} options.credential - A VC.
|
|
133
|
+
* @param {'revocation'|'suspension'} options.statusPurpose - A
|
|
134
|
+
* `statusPurpose`.
|
|
135
|
+
*
|
|
136
|
+
* @throws If the `credentialStatus` is invalid or missing.
|
|
137
|
+
*
|
|
138
|
+
* @returns {object} The resulting `credentialStatus`.
|
|
139
|
+
*/
|
|
140
|
+
export function getCredentialStatus({ credential, statusPurpose } = {}) {
|
|
141
|
+
_isObject({ credential });
|
|
142
|
+
assertBitstringStatusListContext({ credential });
|
|
143
|
+
if (!(statusPurpose && typeof statusPurpose === 'string')) {
|
|
144
|
+
throw new TypeError('"statusPurpose" must be a string.');
|
|
145
|
+
}
|
|
146
|
+
// get and validate status
|
|
147
|
+
if (!(credential.credentialStatus &&
|
|
148
|
+
typeof credential.credentialStatus === 'object')) {
|
|
149
|
+
throw new Error('"credentialStatus" is missing or invalid.');
|
|
150
|
+
}
|
|
151
|
+
const credentialStatuses = _getStatuses({ credential });
|
|
152
|
+
if (credentialStatuses.length === 0) {
|
|
153
|
+
throw new Error('"credentialStatus" with type "BitstringStatusListEntry" ' +
|
|
154
|
+
`and status purpose "${statusPurpose}" not found.`);
|
|
155
|
+
}
|
|
156
|
+
const result = credentialStatuses
|
|
157
|
+
.filter(credentialStatus => _validateStatus({ credentialStatus }))
|
|
158
|
+
.find(
|
|
159
|
+
// check for matching `statusPurpose`
|
|
160
|
+
cs => cs.statusPurpose === statusPurpose);
|
|
161
|
+
if (!result) {
|
|
162
|
+
throw new Error('"credentialStatus" with type "BitstringStatusListEntry" ' +
|
|
163
|
+
`and status purpose "${statusPurpose}" not found.`);
|
|
164
|
+
}
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
async function _checkStatus({ credential, credentialStatus, verifyBitstringStatusListCredential, verifyMatchingIssuers, suite, documentLoader }) {
|
|
168
|
+
// get SL position
|
|
169
|
+
const { statusListIndex } = credentialStatus;
|
|
170
|
+
const index = parseInt(statusListIndex, 10);
|
|
171
|
+
// retrieve SL VC
|
|
172
|
+
let slCredential;
|
|
173
|
+
try {
|
|
174
|
+
;
|
|
175
|
+
({ document: slCredential } = await documentLoader(credentialStatus.statusListCredential));
|
|
176
|
+
}
|
|
177
|
+
catch (e) {
|
|
178
|
+
const err = new Error('Could not load "BitstringStatusListCredential"; ' +
|
|
179
|
+
`reason: ${e.message}`);
|
|
180
|
+
err.cause = e;
|
|
181
|
+
throw err;
|
|
182
|
+
}
|
|
183
|
+
const { statusPurpose: credentialStatusPurpose } = credentialStatus;
|
|
184
|
+
const { statusPurpose: slCredentialStatusPurpose } = slCredential.credentialSubject;
|
|
185
|
+
if (slCredentialStatusPurpose !== credentialStatusPurpose) {
|
|
186
|
+
throw new Error(`The status purpose "${slCredentialStatusPurpose}" of the status ` +
|
|
187
|
+
`list credential does not match the status purpose ` +
|
|
188
|
+
`"${credentialStatusPurpose}" in the credential.`);
|
|
189
|
+
}
|
|
190
|
+
// verify SL VC
|
|
191
|
+
if (verifyBitstringStatusListCredential) {
|
|
192
|
+
const verifyResult = await vcVerifyCredential({
|
|
193
|
+
credential: slCredential,
|
|
194
|
+
suite,
|
|
195
|
+
documentLoader
|
|
196
|
+
});
|
|
197
|
+
if (!verifyResult.verified) {
|
|
198
|
+
const { error: e } = verifyResult;
|
|
199
|
+
let msg = '"BitstringStatusListCredential" not verified';
|
|
200
|
+
if (e) {
|
|
201
|
+
msg += `; reason: ${e.message}`;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
msg += '.';
|
|
205
|
+
}
|
|
206
|
+
const err = new Error(msg);
|
|
207
|
+
if (e) {
|
|
208
|
+
err.cause = verifyResult.error;
|
|
209
|
+
}
|
|
210
|
+
throw err;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// ensure that the issuer of the verifiable credential matches
|
|
214
|
+
// the issuer of the statusListCredential
|
|
215
|
+
if (verifyMatchingIssuers) {
|
|
216
|
+
// covers both the URI and object cases
|
|
217
|
+
const credentialIssuer = typeof credential.issuer === 'object'
|
|
218
|
+
? credential.issuer.id
|
|
219
|
+
: credential.issuer;
|
|
220
|
+
const statusListCredentialIssuer = typeof slCredential.issuer === 'object'
|
|
221
|
+
? slCredential.issuer.id
|
|
222
|
+
: slCredential.issuer;
|
|
223
|
+
if (!(credentialIssuer && statusListCredentialIssuer) ||
|
|
224
|
+
credentialIssuer !== statusListCredentialIssuer) {
|
|
225
|
+
throw new Error('Issuers of the status list credential and verifiable ' +
|
|
226
|
+
'credential do not match.');
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (!slCredential.type.includes('BitstringStatusListCredential')) {
|
|
230
|
+
throw new Error('Status list credential type must include ' +
|
|
231
|
+
'"BitstringStatusListCredential".');
|
|
232
|
+
}
|
|
233
|
+
// get JSON BitstringStatusList
|
|
234
|
+
const { credentialSubject: sl } = slCredential;
|
|
235
|
+
if (sl.type !== 'BitstringStatusList') {
|
|
236
|
+
throw new Error('Status list type must be "BitstringStatusList".');
|
|
237
|
+
}
|
|
238
|
+
// decode list from SL VC
|
|
239
|
+
const { encodedList } = sl;
|
|
240
|
+
const list = await decodeList({ encodedList });
|
|
241
|
+
// return the status value at index
|
|
242
|
+
const status = list.getStatus(index);
|
|
243
|
+
return { verified: true, credentialStatus, status };
|
|
244
|
+
}
|
|
245
|
+
async function _checkStatuses({ credential, documentLoader, suite, verifyBitstringStatusListCredential, verifyMatchingIssuers }) {
|
|
246
|
+
_isObject({ credential });
|
|
247
|
+
if (typeof documentLoader !== 'function') {
|
|
248
|
+
throw new TypeError('"documentLoader" must be a function.');
|
|
249
|
+
}
|
|
250
|
+
if (verifyBitstringStatusListCredential &&
|
|
251
|
+
!(suite &&
|
|
252
|
+
(isArrayOfObjects(suite) ||
|
|
253
|
+
(!Array.isArray(suite) && typeof suite === 'object')))) {
|
|
254
|
+
throw new TypeError('"suite" must be an object or an array of objects.');
|
|
255
|
+
}
|
|
256
|
+
const credentialStatuses = _getStatuses({ credential });
|
|
257
|
+
if (credentialStatuses.length === 0) {
|
|
258
|
+
throw new Error('"credentialStatus.type" must be "BitstringStatusListEntry".');
|
|
259
|
+
}
|
|
260
|
+
credentialStatuses.forEach(credentialStatus => _validateStatus({ credentialStatus }));
|
|
261
|
+
const results = await Promise.all(credentialStatuses.map(credentialStatus => _checkStatus({
|
|
262
|
+
credential,
|
|
263
|
+
credentialStatus,
|
|
264
|
+
suite,
|
|
265
|
+
documentLoader,
|
|
266
|
+
verifyBitstringStatusListCredential,
|
|
267
|
+
verifyMatchingIssuers
|
|
268
|
+
})));
|
|
269
|
+
const verified = results.every(({ verified = false } = {}) => verified === true);
|
|
270
|
+
return { verified, results };
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Takes in a credentialStatus an ensures it meets the
|
|
274
|
+
* normative statements from the Bitstring Status List spec.
|
|
275
|
+
*
|
|
276
|
+
* @see https://www.w3.org/TR/vc-bitstring-status-list/
|
|
277
|
+
*
|
|
278
|
+
* @param {object} options - Options to use.
|
|
279
|
+
* @param {object} options.credentialStatus - A credentialStatus.
|
|
280
|
+
*
|
|
281
|
+
* @throws - An error if the credentialStatus is non-normative.
|
|
282
|
+
*
|
|
283
|
+
* @returns {object} A credentialStatus.
|
|
284
|
+
*/
|
|
285
|
+
function _validateStatus({ credentialStatus }) {
|
|
286
|
+
if (credentialStatus.type !== 'BitstringStatusListEntry') {
|
|
287
|
+
throw new Error('"credentialStatus.type" must be "BitstringStatusListEntry".');
|
|
288
|
+
}
|
|
289
|
+
if (typeof credentialStatus.statusPurpose !== 'string') {
|
|
290
|
+
throw new TypeError('"credentialStatus.statusPurpose" must be a string.');
|
|
291
|
+
}
|
|
292
|
+
if (credentialStatus.id && typeof credentialStatus.id !== 'string') {
|
|
293
|
+
throw new TypeError('"credentialStatus.id" must be a string.');
|
|
294
|
+
}
|
|
295
|
+
if (typeof credentialStatus.statusListCredential !== 'string') {
|
|
296
|
+
throw new TypeError('"credentialStatus.statusListCredential" must be a string.');
|
|
297
|
+
}
|
|
298
|
+
const index = parseInt(credentialStatus.statusListIndex, 10);
|
|
299
|
+
if (isNaN(index)) {
|
|
300
|
+
throw new TypeError('"statusListIndex" must be an integer.');
|
|
301
|
+
}
|
|
302
|
+
if (credentialStatus.id === credentialStatus.statusListCredential) {
|
|
303
|
+
throw new Error('"credentialStatus.id" must not be ' +
|
|
304
|
+
'"credentialStatus.statusListCredential".');
|
|
305
|
+
}
|
|
306
|
+
return credentialStatus;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Checks if a credential is not falsey and an object.
|
|
310
|
+
*
|
|
311
|
+
* @param {object} options - Options to use.
|
|
312
|
+
* @param {object} [options.credential] - A potential VC.
|
|
313
|
+
*
|
|
314
|
+
* @throws - Throws if the credential is falsey or not an object.
|
|
315
|
+
*
|
|
316
|
+
* @returns {undefined}
|
|
317
|
+
*/
|
|
318
|
+
function _isObject({ credential }) {
|
|
319
|
+
if (!(credential && typeof credential === 'object')) {
|
|
320
|
+
throw new TypeError('"credential" must be an object.');
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Gets the statuses of a credential.
|
|
325
|
+
*
|
|
326
|
+
* @param {object} options - Options to use.
|
|
327
|
+
* @param {object} options.credential - A VC with a credentialStatus.
|
|
328
|
+
*
|
|
329
|
+
* @returns {Array<object>} An array of statuses with type
|
|
330
|
+
* "BitstringStatusListEntry" or an empty array if there are no matching
|
|
331
|
+
* types.
|
|
332
|
+
*/
|
|
333
|
+
function _getStatuses({ credential }) {
|
|
334
|
+
const { credentialStatus } = credential;
|
|
335
|
+
if (Array.isArray(credentialStatus)) {
|
|
336
|
+
return credentialStatus.filter(cs => cs.type === 'BitstringStatusListEntry');
|
|
337
|
+
}
|
|
338
|
+
if (credentialStatus &&
|
|
339
|
+
credentialStatus.type === 'BitstringStatusListEntry') {
|
|
340
|
+
return [credentialStatus];
|
|
341
|
+
}
|
|
342
|
+
return [];
|
|
343
|
+
}
|
|
344
|
+
function isArrayOfObjects(x) {
|
|
345
|
+
return (Array.isArray(x) && x.length > 0 && x.every(x => x && typeof x === 'object'));
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,iDAAiD,CAAA;AACtG,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAC7E,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEpE,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,EAAE,CAAA;AACvD,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,EAAE,CAAA;AAEvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAA;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,iBAAiB,CAAC,CAAA;AAEvD,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAsB9B,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAC/B,MAAM,EAGP;IACC,OAAO,IAAI,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,EAC/B,WAAW,EAGZ;IACC,OAAO,mBAAmB,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;AACpD,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACrC,EAAE,EACF,IAAI,EACJ,aAAa,EACb,OAAO,EAMR;IACC,IAAI,CAAC,CAAC,EAAE,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E,gBAAgB,EAAE,GAAG,UAAU,CAAA;IACvC,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACpC,OAAO,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,0BAA0B,CAAC,CAAA;IAC9E,CAAC;IACD,IACE,gBAAgB;QAChB,gBAAgB,CAAC,IAAI,KAAK,0BAA0B,EACpD,CAAC;QACD,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC;AAED,SAAS,gBAAgB,CAAC,CAAU;IAClC,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAC7E,CAAA;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@interop/vc-bitstring-status-list",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Verifiable Credentials Bitstring Status List",
|
|
5
|
+
"license": "BSD-3-Clause",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"react-native": "./dist/index.js",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"module": "dist/index.js",
|
|
15
|
+
"browser": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "pnpm run clear && tsc",
|
|
25
|
+
"clear": "rimraf dist/*",
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"fix": "eslint --fix src test && pnpm run format",
|
|
28
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"*.md\"",
|
|
29
|
+
"lint": "eslint src test",
|
|
30
|
+
"prepare": "pnpm run build",
|
|
31
|
+
"rebuild": "pnpm run clear && pnpm run build",
|
|
32
|
+
"test": "pnpm run lint && pnpm run test-node && pnpm run test-browser",
|
|
33
|
+
"test-browser": "playwright test",
|
|
34
|
+
"test-node": "vitest run",
|
|
35
|
+
"test-coverage": "vitest run --coverage"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@digitalbazaar/bitstring": "^3.1.0",
|
|
39
|
+
"@digitalbazaar/credentials-context": "^3.2.0",
|
|
40
|
+
"@digitalbazaar/vc-bitstring-status-list-context": "^1.1.0",
|
|
41
|
+
"@interop/vc": "^11.0.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@eslint/js": "^10.0.1",
|
|
45
|
+
"@interop/did-method-key": "^7.1.0",
|
|
46
|
+
"@interop/ed25519-signature": "^7.0.1",
|
|
47
|
+
"@interop/ed25519-verification-key": "^7.0.1",
|
|
48
|
+
"@interop/security-document-loader": "^9.2.1",
|
|
49
|
+
"@playwright/test": "^1.60.0",
|
|
50
|
+
"@types/node": "^25.9.1",
|
|
51
|
+
"@vitest/coverage-v8": "^4.1.7",
|
|
52
|
+
"eslint": "^10.4.0",
|
|
53
|
+
"eslint-config-prettier": "^10.1.8",
|
|
54
|
+
"globals": "^17.6.0",
|
|
55
|
+
"prettier": "^3.8.3",
|
|
56
|
+
"rimraf": "^6.1.3",
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"typescript-eslint": "^8.59.4",
|
|
59
|
+
"vite": "^8.0.14",
|
|
60
|
+
"vitest": "^4.1.7"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "https://github.com/interop-alliance/vc-bitstring-status-list"
|
|
65
|
+
},
|
|
66
|
+
"keywords": [
|
|
67
|
+
"vc",
|
|
68
|
+
"verifiable credential",
|
|
69
|
+
"status list",
|
|
70
|
+
"bitstring",
|
|
71
|
+
"BitstringStatusList",
|
|
72
|
+
"BitstringStatusListCredential",
|
|
73
|
+
"VerifiableCredential"
|
|
74
|
+
],
|
|
75
|
+
"author": {
|
|
76
|
+
"name": "Digital Bazaar, Inc.",
|
|
77
|
+
"email": "support@digitalbazaar.com",
|
|
78
|
+
"url": "https://digitalbazaar.com/"
|
|
79
|
+
},
|
|
80
|
+
"bugs": {
|
|
81
|
+
"url": "https://github.com/interop-alliance/vc-bitstring-status-list/issues"
|
|
82
|
+
},
|
|
83
|
+
"homepage": "https://github.com/interop-alliance/vc-bitstring-status-list",
|
|
84
|
+
"engines": {
|
|
85
|
+
"node": ">=24.0"
|
|
86
|
+
},
|
|
87
|
+
"packageManager": "pnpm@11.3.0",
|
|
88
|
+
"publishConfig": {
|
|
89
|
+
"access": "public"
|
|
90
|
+
}
|
|
91
|
+
}
|