@twin.org/standards-w3c-did 0.0.1 → 0.0.2-next.10

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.
Files changed (29) hide show
  1. package/dist/cjs/index.cjs +31 -0
  2. package/dist/esm/index.mjs +31 -1
  3. package/dist/types/index.d.ts +7 -0
  4. package/dist/types/models/IDidVerifiableCredential.d.ts +3 -71
  5. package/dist/types/models/IDidVerifiableCredentialCommon.d.ts +57 -0
  6. package/dist/types/models/IDidVerifiableCredentialV1.d.ts +21 -0
  7. package/dist/types/models/IDidVerifiableCredentialV2.d.ts +21 -0
  8. package/dist/types/models/IDidVerifiablePresentation.d.ts +3 -31
  9. package/dist/types/models/IDidVerifiablePresentationCommon.d.ts +23 -0
  10. package/dist/types/models/IDidVerifiablePresentationV1.d.ts +17 -0
  11. package/dist/types/models/IDidVerifiablePresentationV2.d.ts +17 -0
  12. package/dist/types/utils/verifiableCredentialHelper.d.ts +22 -0
  13. package/docs/changelog.md +77 -0
  14. package/docs/reference/classes/VerifiableCredentialHelper.md +65 -0
  15. package/docs/reference/index.md +9 -2
  16. package/docs/reference/interfaces/IDidDocumentVerificationMethod.md +1 -1
  17. package/docs/reference/interfaces/{IDidVerifiableCredential.md → IDidVerifiableCredentialCommon.md} +5 -32
  18. package/docs/reference/interfaces/IDidVerifiableCredentialV1.md +154 -0
  19. package/docs/reference/interfaces/IDidVerifiableCredentialV2.md +154 -0
  20. package/docs/reference/interfaces/{IDidVerifiablePresentation.md → IDidVerifiablePresentationCommon.md} +5 -16
  21. package/docs/reference/interfaces/IDidVerifiablePresentationV1.md +72 -0
  22. package/docs/reference/interfaces/IDidVerifiablePresentationV2.md +72 -0
  23. package/docs/reference/type-aliases/IDidVerifiableCredential.md +5 -0
  24. package/docs/reference/type-aliases/IDidVerifiablePresentation.md +5 -0
  25. package/docs/reference/variables/DidContexts.md +1 -1
  26. package/docs/reference/variables/DidCryptoSuites.md +1 -1
  27. package/docs/reference/variables/DidTypes.md +1 -1
  28. package/docs/reference/variables/ProofTypes.md +1 -1
  29. package/package.json +6 -6
@@ -515,6 +515,36 @@ class ProofHelper {
515
515
  }
516
516
  }
517
517
 
518
+ // Copyright 2024 IOTA Stiftung.
519
+ // SPDX-License-Identifier: Apache-2.0.
520
+ /**
521
+ * Helper methods for creating and verifying proofs.
522
+ */
523
+ class VerifiableCredentialHelper {
524
+ /**
525
+ * Runtime name for the class.
526
+ */
527
+ static CLASS_NAME = "VerifiableCredentialHelper";
528
+ /**
529
+ * Get the valid until date from a verifiable credential.
530
+ * @param verifiableCredential The verifiable credential to extract the expiration date from.
531
+ * @returns The expiration date, if available.
532
+ */
533
+ static getValidUntil(verifiableCredential) {
534
+ return (core.ObjectHelper.propertyGet(verifiableCredential, "validUntil") ??
535
+ core.ObjectHelper.propertyGet(verifiableCredential, "expirationDate"));
536
+ }
537
+ /**
538
+ * Get the valid from from a verifiable credential.
539
+ * @param verifiableCredential The verifiable credential to extract the issuance date from.
540
+ * @returns The issuance date, if available.
541
+ */
542
+ static getValidFrom(verifiableCredential) {
543
+ return (core.ObjectHelper.propertyGet(verifiableCredential, "validFrom") ??
544
+ core.ObjectHelper.propertyGet(verifiableCredential, "issuanceDate"));
545
+ }
546
+ }
547
+
518
548
  exports.DataIntegrityProofSignerVerifier = DataIntegrityProofSignerVerifier;
519
549
  exports.DidContexts = DidContexts;
520
550
  exports.DidCryptoSuites = DidCryptoSuites;
@@ -524,3 +554,4 @@ exports.JsonWebSignature2020SignerVerifier = JsonWebSignature2020SignerVerifier;
524
554
  exports.MultikeyHelper = MultikeyHelper;
525
555
  exports.ProofHelper = ProofHelper;
526
556
  exports.ProofTypes = ProofTypes;
557
+ exports.VerifiableCredentialHelper = VerifiableCredentialHelper;
@@ -513,4 +513,34 @@ class ProofHelper {
513
513
  }
514
514
  }
515
515
 
516
- export { DataIntegrityProofSignerVerifier, DidContexts, DidCryptoSuites, DidTypes, DidVerificationMethodType, JsonWebSignature2020SignerVerifier, MultikeyHelper, ProofHelper, ProofTypes };
516
+ // Copyright 2024 IOTA Stiftung.
517
+ // SPDX-License-Identifier: Apache-2.0.
518
+ /**
519
+ * Helper methods for creating and verifying proofs.
520
+ */
521
+ class VerifiableCredentialHelper {
522
+ /**
523
+ * Runtime name for the class.
524
+ */
525
+ static CLASS_NAME = "VerifiableCredentialHelper";
526
+ /**
527
+ * Get the valid until date from a verifiable credential.
528
+ * @param verifiableCredential The verifiable credential to extract the expiration date from.
529
+ * @returns The expiration date, if available.
530
+ */
531
+ static getValidUntil(verifiableCredential) {
532
+ return (ObjectHelper.propertyGet(verifiableCredential, "validUntil") ??
533
+ ObjectHelper.propertyGet(verifiableCredential, "expirationDate"));
534
+ }
535
+ /**
536
+ * Get the valid from from a verifiable credential.
537
+ * @param verifiableCredential The verifiable credential to extract the issuance date from.
538
+ * @returns The issuance date, if available.
539
+ */
540
+ static getValidFrom(verifiableCredential) {
541
+ return (ObjectHelper.propertyGet(verifiableCredential, "validFrom") ??
542
+ ObjectHelper.propertyGet(verifiableCredential, "issuanceDate"));
543
+ }
544
+ }
545
+
546
+ export { DataIntegrityProofSignerVerifier, DidContexts, DidCryptoSuites, DidTypes, DidVerificationMethodType, JsonWebSignature2020SignerVerifier, MultikeyHelper, ProofHelper, ProofTypes, VerifiableCredentialHelper };
@@ -11,7 +11,13 @@ export * from "./models/IDidLabel";
11
11
  export * from "./models/IDidPresentationVerification";
12
12
  export * from "./models/IDidService";
13
13
  export * from "./models/IDidVerifiableCredential";
14
+ export * from "./models/IDidVerifiableCredentialCommon";
15
+ export * from "./models/IDidVerifiableCredentialV1";
16
+ export * from "./models/IDidVerifiableCredentialV2";
14
17
  export * from "./models/IDidVerifiablePresentation";
18
+ export * from "./models/IDidVerifiablePresentationCommon";
19
+ export * from "./models/IDidVerifiablePresentationV1";
20
+ export * from "./models/IDidVerifiablePresentationV2";
15
21
  export * from "./models/IJsonWebSignature2020Proof";
16
22
  export * from "./models/IMultikey";
17
23
  export * from "./models/IProof";
@@ -21,3 +27,4 @@ export * from "./signerVerifiers/dataIntegrityProofSignerVerifier";
21
27
  export * from "./signerVerifiers/jsonWebSignature2020SignerVerifier";
22
28
  export * from "./utils/multikeyHelper";
23
29
  export * from "./utils/proofHelper";
30
+ export * from "./utils/verifiableCredentialHelper";
@@ -1,74 +1,6 @@
1
- import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- import type { DidContexts } from "./didContexts";
3
- import type { IDidCredentialSchema } from "./IDidCredentialSchema";
4
- import type { IDidCredentialStatus } from "./IDidCredentialStatus";
5
- import type { IDidLabel } from "./IDidLabel";
6
- import type { IProof } from "./IProof";
1
+ import type { IDidVerifiableCredentialV1 } from "./IDidVerifiableCredentialV1";
2
+ import type { IDidVerifiableCredentialV2 } from "./IDidVerifiableCredentialV2";
7
3
  /**
8
4
  * Interface describing a verifiable credential.
9
- * https://www.w3.org/TR/vc-data-model-2.0
10
5
  */
11
- export interface IDidVerifiableCredential {
12
- /**
13
- * The context for the verifiable credential.
14
- */
15
- "@context": typeof DidContexts.ContextVCv1 | typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv1, ...IJsonLdContextDefinitionElement[]] | [typeof DidContexts.ContextVCv2, ...IJsonLdContextDefinitionElement[]];
16
- /**
17
- * The identifier for the verifiable credential.
18
- */
19
- id?: string;
20
- /**
21
- * The types of the data stored in the verifiable credential.
22
- */
23
- type: string | string[];
24
- /**
25
- * The data for the verifiable credential.
26
- */
27
- credentialSubject?: IJsonLdNodeObject | IJsonLdNodeObject[];
28
- /**
29
- * Used to discover information about the current status of the
30
- * verifiable credential, such as whether it is suspended or revoked.
31
- */
32
- credentialStatus?: IDidCredentialStatus | IDidCredentialStatus[];
33
- /**
34
- * Annotate type definitions or lock them to specific versions of the vocabulary.
35
- */
36
- credentialSchema?: IDidCredentialSchema | IDidCredentialSchema[];
37
- /**
38
- * The issuing identity.
39
- */
40
- issuer?: string | {
41
- id: string;
42
- name?: string | IDidLabel[];
43
- description?: string | IDidLabel[];
44
- };
45
- /**
46
- * The date the verifiable credential was issued.
47
- */
48
- issuanceDate?: string;
49
- /**
50
- * The name of the credential.
51
- */
52
- name?: string | IDidLabel[];
53
- /**
54
- * The description of the credential.
55
- */
56
- description?: string | IDidLabel[];
57
- /**
58
- * The date the verifiable credential is valid from.
59
- */
60
- validFrom?: string;
61
- /**
62
- * The date the verifiable credential is valid until.
63
- */
64
- validUntil?: string;
65
- /**
66
- * Evidence associated with the Credential.
67
- */
68
- evidence?: IJsonLdNodeObject | IJsonLdNodeObject[];
69
- /**
70
- * Proofs that the verifiable credential is valid.
71
- * Optional if a different proof method is used, such as JWT.
72
- */
73
- proof?: IProof | IProof[];
74
- }
6
+ export type IDidVerifiableCredential = IDidVerifiableCredentialV1 | IDidVerifiableCredentialV2;
@@ -0,0 +1,57 @@
1
+ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
+ import type { IDidCredentialSchema } from "./IDidCredentialSchema";
3
+ import type { IDidCredentialStatus } from "./IDidCredentialStatus";
4
+ import type { IDidLabel } from "./IDidLabel";
5
+ import type { IProof } from "./IProof";
6
+ /**
7
+ * Interface describing a verifiable credential.
8
+ * https://www.w3.org/TR/vc-data-model-2.0
9
+ */
10
+ export interface IDidVerifiableCredentialCommon {
11
+ /**
12
+ * The identifier for the verifiable credential.
13
+ */
14
+ id?: string;
15
+ /**
16
+ * The types of the data stored in the verifiable credential.
17
+ */
18
+ type: string | string[];
19
+ /**
20
+ * The data for the verifiable credential.
21
+ */
22
+ credentialSubject?: IJsonLdNodeObject | IJsonLdNodeObject[];
23
+ /**
24
+ * Used to discover information about the current status of the
25
+ * verifiable credential, such as whether it is suspended or revoked.
26
+ */
27
+ credentialStatus?: IDidCredentialStatus | IDidCredentialStatus[];
28
+ /**
29
+ * Annotate type definitions or lock them to specific versions of the vocabulary.
30
+ */
31
+ credentialSchema?: IDidCredentialSchema | IDidCredentialSchema[];
32
+ /**
33
+ * The issuing identity.
34
+ */
35
+ issuer?: string | {
36
+ id: string;
37
+ name?: string | IDidLabel[];
38
+ description?: string | IDidLabel[];
39
+ };
40
+ /**
41
+ * The name of the credential.
42
+ */
43
+ name?: string | IDidLabel[];
44
+ /**
45
+ * The description of the credential.
46
+ */
47
+ description?: string | IDidLabel[];
48
+ /**
49
+ * Evidence associated with the Credential.
50
+ */
51
+ evidence?: IJsonLdNodeObject | IJsonLdNodeObject[];
52
+ /**
53
+ * Proofs that the verifiable credential is valid.
54
+ * Optional if a different proof method is used, such as JWT.
55
+ */
56
+ proof?: IProof | IProof[];
57
+ }
@@ -0,0 +1,21 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
+ import type { DidContexts } from "./didContexts";
3
+ import type { IDidVerifiableCredentialCommon } from "./IDidVerifiableCredentialCommon";
4
+ /**
5
+ * Interface describing a verifiable credential.
6
+ * https://www.w3.org/TR/vc-data-model-1.1
7
+ */
8
+ export interface IDidVerifiableCredentialV1 extends IDidVerifiableCredentialCommon {
9
+ /**
10
+ * The context for the verifiable credential.
11
+ */
12
+ "@context": typeof DidContexts.ContextVCv1 | [typeof DidContexts.ContextVCv1, ...IJsonLdContextDefinitionElement[]];
13
+ /**
14
+ * The date the verifiable credential was issued, depending on version validFrom might be set instead.
15
+ */
16
+ issuanceDate?: string;
17
+ /**
18
+ * The date the verifiable credential expires, depending on version validUntil might be set instead.
19
+ */
20
+ expirationDate?: string;
21
+ }
@@ -0,0 +1,21 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
+ import type { DidContexts } from "./didContexts";
3
+ import type { IDidVerifiableCredentialCommon } from "./IDidVerifiableCredentialCommon";
4
+ /**
5
+ * Interface describing a verifiable credential.
6
+ * https://www.w3.org/TR/vc-data-model-2.0
7
+ */
8
+ export interface IDidVerifiableCredentialV2 extends IDidVerifiableCredentialCommon {
9
+ /**
10
+ * The context for the verifiable credential.
11
+ */
12
+ "@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...IJsonLdContextDefinitionElement[]];
13
+ /**
14
+ * The date the verifiable credential is valid from.
15
+ */
16
+ validFrom?: string;
17
+ /**
18
+ * The date the verifiable credential is valid until.
19
+ */
20
+ validUntil?: string;
21
+ }
@@ -1,34 +1,6 @@
1
- import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
- import type { DidContexts } from "./didContexts";
3
- import type { IDidVerifiableCredential } from "./IDidVerifiableCredential";
4
- import type { IProof } from "./IProof";
1
+ import type { IDidVerifiablePresentationV1 } from "./IDidVerifiablePresentationV1";
2
+ import type { IDidVerifiablePresentationV2 } from "./IDidVerifiablePresentationV2";
5
3
  /**
6
4
  * Interface describing a verifiable presentation.
7
5
  */
8
- export interface IDidVerifiablePresentation {
9
- /**
10
- * The context for the verifiable presentation.
11
- */
12
- "@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...IJsonLdContextDefinitionElement[]];
13
- /**
14
- * Provide a unique identifier for the presentation.
15
- */
16
- id?: string;
17
- /**
18
- * The types of the data stored in the verifiable credential.
19
- */
20
- type: string | string[];
21
- /**
22
- * The data for the verifiable credentials.
23
- */
24
- verifiableCredential?: (string | IDidVerifiableCredential)[];
25
- /**
26
- * The entity generating the presentation.
27
- */
28
- holder?: string;
29
- /**
30
- * Proofs that the verifiable presentation is valid.
31
- * Optional if a different proof method is used, such as JWT.
32
- */
33
- proof?: IProof | IProof[];
34
- }
6
+ export type IDidVerifiablePresentation = IDidVerifiablePresentationV1 | IDidVerifiablePresentationV2;
@@ -0,0 +1,23 @@
1
+ import type { IProof } from "./IProof";
2
+ /**
3
+ * Interface describing a verifiable presentation.
4
+ */
5
+ export interface IDidVerifiablePresentationCommon {
6
+ /**
7
+ * Provide a unique identifier for the presentation.
8
+ */
9
+ id?: string;
10
+ /**
11
+ * The types of the data stored in the verifiable credential.
12
+ */
13
+ type: string | string[];
14
+ /**
15
+ * The entity generating the presentation.
16
+ */
17
+ holder?: string;
18
+ /**
19
+ * Proofs that the verifiable presentation is valid.
20
+ * Optional if a different proof method is used, such as JWT.
21
+ */
22
+ proof?: IProof | IProof[];
23
+ }
@@ -0,0 +1,17 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
+ import type { DidContexts } from "./didContexts";
3
+ import type { IDidVerifiableCredentialV1 } from "./IDidVerifiableCredentialV1";
4
+ import type { IDidVerifiablePresentationCommon } from "./IDidVerifiablePresentationCommon";
5
+ /**
6
+ * Interface describing a verifiable presentation.
7
+ */
8
+ export interface IDidVerifiablePresentationV1 extends IDidVerifiablePresentationCommon {
9
+ /**
10
+ * The context for the verifiable presentation.
11
+ */
12
+ "@context": typeof DidContexts.ContextVCv1 | [typeof DidContexts.ContextVCv1, ...IJsonLdContextDefinitionElement[]];
13
+ /**
14
+ * The data for the verifiable credentials.
15
+ */
16
+ verifiableCredential?: (string | IDidVerifiableCredentialV1)[];
17
+ }
@@ -0,0 +1,17 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
+ import type { DidContexts } from "./didContexts";
3
+ import type { IDidVerifiableCredentialV2 } from "./IDidVerifiableCredentialV2";
4
+ import type { IDidVerifiablePresentationCommon } from "./IDidVerifiablePresentationCommon";
5
+ /**
6
+ * Interface describing a verifiable presentation.
7
+ */
8
+ export interface IDidVerifiablePresentationV2 extends IDidVerifiablePresentationCommon {
9
+ /**
10
+ * The context for the verifiable presentation.
11
+ */
12
+ "@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...IJsonLdContextDefinitionElement[]];
13
+ /**
14
+ * The data for the verifiable credentials.
15
+ */
16
+ verifiableCredential?: (string | IDidVerifiableCredentialV2)[];
17
+ }
@@ -0,0 +1,22 @@
1
+ import type { IDidVerifiableCredential } from "../models/IDidVerifiableCredential";
2
+ /**
3
+ * Helper methods for creating and verifying proofs.
4
+ */
5
+ export declare class VerifiableCredentialHelper {
6
+ /**
7
+ * Runtime name for the class.
8
+ */
9
+ static readonly CLASS_NAME: string;
10
+ /**
11
+ * Get the valid until date from a verifiable credential.
12
+ * @param verifiableCredential The verifiable credential to extract the expiration date from.
13
+ * @returns The expiration date, if available.
14
+ */
15
+ static getValidUntil(verifiableCredential: IDidVerifiableCredential): string | undefined;
16
+ /**
17
+ * Get the valid from from a verifiable credential.
18
+ * @param verifiableCredential The verifiable credential to extract the issuance date from.
19
+ * @returns The issuance date, if available.
20
+ */
21
+ static getValidFrom(verifiableCredential: IDidVerifiableCredential): string | undefined;
22
+ }
package/docs/changelog.md CHANGED
@@ -1,5 +1,82 @@
1
1
  # @twin.org/standards-w3c-did - Changelog
2
2
 
3
+ ## [0.0.2-next.10](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.9...standards-w3c-did-v0.0.2-next.10) (2025-09-16)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **standards-w3c-did:** Synchronize repo versions
9
+
10
+ ## [0.0.2-next.9](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.8...standards-w3c-did-v0.0.2-next.9) (2025-09-15)
11
+
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * **standards-w3c-did:** Synchronize repo versions
16
+
17
+ ## [0.0.2-next.8](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.7...standards-w3c-did-v0.0.2-next.8) (2025-09-15)
18
+
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * **standards-w3c-did:** Synchronize repo versions
23
+
24
+ ## [0.0.2-next.7](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.6...standards-w3c-did-v0.0.2-next.7) (2025-09-15)
25
+
26
+
27
+ ### Miscellaneous Chores
28
+
29
+ * **standards-w3c-did:** Synchronize repo versions
30
+
31
+ ## [0.0.2-next.6](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.5...standards-w3c-did-v0.0.2-next.6) (2025-09-12)
32
+
33
+
34
+ ### Miscellaneous Chores
35
+
36
+ * **standards-w3c-did:** Synchronize repo versions
37
+
38
+ ## [0.0.2-next.5](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.4...standards-w3c-did-v0.0.2-next.5) (2025-09-12)
39
+
40
+
41
+ ### Features
42
+
43
+ * separate DID VP v1 and v2 properties ([335a3c2](https://github.com/twinfoundation/standards/commit/335a3c2543ca5dbaae785568617ea85c0a8269ad))
44
+
45
+ ## [0.0.2-next.4](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.3...standards-w3c-did-v0.0.2-next.4) (2025-09-12)
46
+
47
+
48
+ ### Features
49
+
50
+ * separate DID VC v1 and v2 properties ([935cf0a](https://github.com/twinfoundation/standards/commit/935cf0a9cdee28c6f2d5480f1f2de126c838caf5))
51
+
52
+ ## [0.0.2-next.3](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.2...standards-w3c-did-v0.0.2-next.3) (2025-08-29)
53
+
54
+
55
+ ### Features
56
+
57
+ * eslint migration to flat config ([648c1a1](https://github.com/twinfoundation/standards/commit/648c1a1e69d99b6b0cf69358ec6bdeecdbe3a5ea))
58
+
59
+ ## [0.0.2-next.2](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.1...standards-w3c-did-v0.0.2-next.2) (2025-08-19)
60
+
61
+
62
+ ### Features
63
+
64
+ * update framework core ([58c0c3d](https://github.com/twinfoundation/standards/commit/58c0c3dd6cea0e4c2393dc0e3e1eb33a6d06f617))
65
+
66
+ ## [0.0.2-next.1](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.0...standards-w3c-did-v0.0.2-next.1) (2025-07-14)
67
+
68
+
69
+ ### Features
70
+
71
+ * Add additional properties to the verifiable credential data model ([#8](https://github.com/twinfoundation/standards/issues/8)) ([4b7af9c](https://github.com/twinfoundation/standards/commit/4b7af9cf892e071eb348f30737c035c0f94591b5))
72
+ * alg usage ([#19](https://github.com/twinfoundation/standards/issues/19)) ([3946fb2](https://github.com/twinfoundation/standards/commit/3946fb2e8bd9a486ad186765d1d09361fa75786b))
73
+ * export additional schemas ([4201127](https://github.com/twinfoundation/standards/commit/42011276a0b9110b75557c555f859db4d7382aca))
74
+ * normalise type outputs ([0b3aed7](https://github.com/twinfoundation/standards/commit/0b3aed7df0802cd609423bbd7fda6bde601d3ceb))
75
+ * update to latest JSON schema spec ([7a23930](https://github.com/twinfoundation/standards/commit/7a2393032d7f48bfb20d3a484f981fb6dd83a92c))
76
+ * update ts-to-schema generation ([ba4e76d](https://github.com/twinfoundation/standards/commit/ba4e76d677556a1817092f8079d4cce67dee94bc))
77
+ * update ts-to-schema generation ([0905daa](https://github.com/twinfoundation/standards/commit/0905daa4a344ed35fc37b7f12fcf9ce9d34e4bd6))
78
+ * use shared store mechanism ([#11](https://github.com/twinfoundation/standards/issues/11)) ([96fa237](https://github.com/twinfoundation/standards/commit/96fa23735f69c1fc7e3d0019b527634fa0a042d9))
79
+
3
80
  ## 0.0.1 (2025-07-03)
4
81
 
5
82
 
@@ -0,0 +1,65 @@
1
+ # Class: VerifiableCredentialHelper
2
+
3
+ Helper methods for creating and verifying proofs.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new VerifiableCredentialHelper**(): `VerifiableCredentialHelper`
10
+
11
+ #### Returns
12
+
13
+ `VerifiableCredentialHelper`
14
+
15
+ ## Properties
16
+
17
+ ### CLASS\_NAME
18
+
19
+ > `readonly` `static` **CLASS\_NAME**: `string`
20
+
21
+ Runtime name for the class.
22
+
23
+ ## Methods
24
+
25
+ ### getValidUntil()
26
+
27
+ > `static` **getValidUntil**(`verifiableCredential`): `undefined` \| `string`
28
+
29
+ Get the valid until date from a verifiable credential.
30
+
31
+ #### Parameters
32
+
33
+ ##### verifiableCredential
34
+
35
+ [`IDidVerifiableCredential`](../type-aliases/IDidVerifiableCredential.md)
36
+
37
+ The verifiable credential to extract the expiration date from.
38
+
39
+ #### Returns
40
+
41
+ `undefined` \| `string`
42
+
43
+ The expiration date, if available.
44
+
45
+ ***
46
+
47
+ ### getValidFrom()
48
+
49
+ > `static` **getValidFrom**(`verifiableCredential`): `undefined` \| `string`
50
+
51
+ Get the valid from from a verifiable credential.
52
+
53
+ #### Parameters
54
+
55
+ ##### verifiableCredential
56
+
57
+ [`IDidVerifiableCredential`](../type-aliases/IDidVerifiableCredential.md)
58
+
59
+ The verifiable credential to extract the issuance date from.
60
+
61
+ #### Returns
62
+
63
+ `undefined` \| `string`
64
+
65
+ The issuance date, if available.
@@ -6,6 +6,7 @@
6
6
  - [JsonWebSignature2020SignerVerifier](classes/JsonWebSignature2020SignerVerifier.md)
7
7
  - [MultikeyHelper](classes/MultikeyHelper.md)
8
8
  - [ProofHelper](classes/ProofHelper.md)
9
+ - [VerifiableCredentialHelper](classes/VerifiableCredentialHelper.md)
9
10
 
10
11
  ## Interfaces
11
12
 
@@ -17,14 +18,20 @@
17
18
  - [IDidLabel](interfaces/IDidLabel.md)
18
19
  - [IDidPresentationVerification](interfaces/IDidPresentationVerification.md)
19
20
  - [IDidService](interfaces/IDidService.md)
20
- - [IDidVerifiableCredential](interfaces/IDidVerifiableCredential.md)
21
- - [IDidVerifiablePresentation](interfaces/IDidVerifiablePresentation.md)
21
+ - [IDidVerifiableCredentialCommon](interfaces/IDidVerifiableCredentialCommon.md)
22
+ - [IDidVerifiableCredentialV1](interfaces/IDidVerifiableCredentialV1.md)
23
+ - [IDidVerifiableCredentialV2](interfaces/IDidVerifiableCredentialV2.md)
24
+ - [IDidVerifiablePresentationCommon](interfaces/IDidVerifiablePresentationCommon.md)
25
+ - [IDidVerifiablePresentationV1](interfaces/IDidVerifiablePresentationV1.md)
26
+ - [IDidVerifiablePresentationV2](interfaces/IDidVerifiablePresentationV2.md)
22
27
  - [IJsonWebSignature2020Proof](interfaces/IJsonWebSignature2020Proof.md)
23
28
  - [IMultikey](interfaces/IMultikey.md)
24
29
  - [IProofSignerVerifier](interfaces/IProofSignerVerifier.md)
25
30
 
26
31
  ## Type Aliases
27
32
 
33
+ - [IDidVerifiableCredential](type-aliases/IDidVerifiableCredential.md)
34
+ - [IDidVerifiablePresentation](type-aliases/IDidVerifiablePresentation.md)
28
35
  - [IProof](type-aliases/IProof.md)
29
36
  - [DidContexts](type-aliases/DidContexts.md)
30
37
  - [DidCryptoSuites](type-aliases/DidCryptoSuites.md)
@@ -8,7 +8,7 @@ Interface describing a DID document verification method.
8
8
 
9
9
  ## Indexable
10
10
 
11
- \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinition` \| `IJsonLdContextDefinitionElement`[] \| `string`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{[`key`: `string`]: `string`; \}
11
+ \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinition` \| `IJsonLdContextDefinitionElement`[] \| `string`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \}
12
12
 
13
13
  ## Properties
14
14
 
@@ -1,17 +1,14 @@
1
- # Interface: IDidVerifiableCredential
1
+ # Interface: IDidVerifiableCredentialCommon
2
2
 
3
3
  Interface describing a verifiable credential.
4
4
  https://www.w3.org/TR/vc-data-model-2.0
5
5
 
6
- ## Properties
7
-
8
- ### @context
9
-
10
- > **@context**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\] \| \[`"https://www.w3.org/2018/credentials/v1"`, `...IJsonLdContextDefinitionElement[]`\]
6
+ ## Extended by
11
7
 
12
- The context for the verifiable credential.
8
+ - [`IDidVerifiableCredentialV1`](IDidVerifiableCredentialV1.md)
9
+ - [`IDidVerifiableCredentialV2`](IDidVerifiableCredentialV2.md)
13
10
 
14
- ***
11
+ ## Properties
15
12
 
16
13
  ### id?
17
14
 
@@ -62,14 +59,6 @@ The issuing identity.
62
59
 
63
60
  ***
64
61
 
65
- ### issuanceDate?
66
-
67
- > `optional` **issuanceDate**: `string`
68
-
69
- The date the verifiable credential was issued.
70
-
71
- ***
72
-
73
62
  ### name?
74
63
 
75
64
  > `optional` **name**: `string` \| [`IDidLabel`](IDidLabel.md)[]
@@ -86,22 +75,6 @@ The description of the credential.
86
75
 
87
76
  ***
88
77
 
89
- ### validFrom?
90
-
91
- > `optional` **validFrom**: `string`
92
-
93
- The date the verifiable credential is valid from.
94
-
95
- ***
96
-
97
- ### validUntil?
98
-
99
- > `optional` **validUntil**: `string`
100
-
101
- The date the verifiable credential is valid until.
102
-
103
- ***
104
-
105
78
  ### evidence?
106
79
 
107
80
  > `optional` **evidence**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
@@ -0,0 +1,154 @@
1
+ # Interface: IDidVerifiableCredentialV1
2
+
3
+ Interface describing a verifiable credential.
4
+ https://www.w3.org/TR/vc-data-model-1.1
5
+
6
+ ## Extends
7
+
8
+ - [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md)
9
+
10
+ ## Properties
11
+
12
+ ### id?
13
+
14
+ > `optional` **id**: `string`
15
+
16
+ The identifier for the verifiable credential.
17
+
18
+ #### Inherited from
19
+
20
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`id`](IDidVerifiableCredentialCommon.md#id)
21
+
22
+ ***
23
+
24
+ ### type
25
+
26
+ > **type**: `string` \| `string`[]
27
+
28
+ The types of the data stored in the verifiable credential.
29
+
30
+ #### Inherited from
31
+
32
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`type`](IDidVerifiableCredentialCommon.md#type)
33
+
34
+ ***
35
+
36
+ ### credentialSubject?
37
+
38
+ > `optional` **credentialSubject**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
39
+
40
+ The data for the verifiable credential.
41
+
42
+ #### Inherited from
43
+
44
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`credentialSubject`](IDidVerifiableCredentialCommon.md#credentialsubject)
45
+
46
+ ***
47
+
48
+ ### credentialStatus?
49
+
50
+ > `optional` **credentialStatus**: [`IDidCredentialStatus`](IDidCredentialStatus.md) \| [`IDidCredentialStatus`](IDidCredentialStatus.md)[]
51
+
52
+ Used to discover information about the current status of the
53
+ verifiable credential, such as whether it is suspended or revoked.
54
+
55
+ #### Inherited from
56
+
57
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`credentialStatus`](IDidVerifiableCredentialCommon.md#credentialstatus)
58
+
59
+ ***
60
+
61
+ ### credentialSchema?
62
+
63
+ > `optional` **credentialSchema**: [`IDidCredentialSchema`](IDidCredentialSchema.md) \| [`IDidCredentialSchema`](IDidCredentialSchema.md)[]
64
+
65
+ Annotate type definitions or lock them to specific versions of the vocabulary.
66
+
67
+ #### Inherited from
68
+
69
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`credentialSchema`](IDidVerifiableCredentialCommon.md#credentialschema)
70
+
71
+ ***
72
+
73
+ ### issuer?
74
+
75
+ > `optional` **issuer**: `string` \| \{ `id`: `string`; `name?`: `string` \| [`IDidLabel`](IDidLabel.md)[]; `description?`: `string` \| [`IDidLabel`](IDidLabel.md)[]; \}
76
+
77
+ The issuing identity.
78
+
79
+ #### Inherited from
80
+
81
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`issuer`](IDidVerifiableCredentialCommon.md#issuer)
82
+
83
+ ***
84
+
85
+ ### name?
86
+
87
+ > `optional` **name**: `string` \| [`IDidLabel`](IDidLabel.md)[]
88
+
89
+ The name of the credential.
90
+
91
+ #### Inherited from
92
+
93
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`name`](IDidVerifiableCredentialCommon.md#name)
94
+
95
+ ***
96
+
97
+ ### description?
98
+
99
+ > `optional` **description**: `string` \| [`IDidLabel`](IDidLabel.md)[]
100
+
101
+ The description of the credential.
102
+
103
+ #### Inherited from
104
+
105
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`description`](IDidVerifiableCredentialCommon.md#description)
106
+
107
+ ***
108
+
109
+ ### evidence?
110
+
111
+ > `optional` **evidence**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
112
+
113
+ Evidence associated with the Credential.
114
+
115
+ #### Inherited from
116
+
117
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`evidence`](IDidVerifiableCredentialCommon.md#evidence)
118
+
119
+ ***
120
+
121
+ ### proof?
122
+
123
+ > `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
124
+
125
+ Proofs that the verifiable credential is valid.
126
+ Optional if a different proof method is used, such as JWT.
127
+
128
+ #### Inherited from
129
+
130
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`proof`](IDidVerifiableCredentialCommon.md#proof)
131
+
132
+ ***
133
+
134
+ ### @context
135
+
136
+ > **@context**: `"https://www.w3.org/2018/credentials/v1"` \| \[`"https://www.w3.org/2018/credentials/v1"`, `...IJsonLdContextDefinitionElement[]`\]
137
+
138
+ The context for the verifiable credential.
139
+
140
+ ***
141
+
142
+ ### issuanceDate?
143
+
144
+ > `optional` **issuanceDate**: `string`
145
+
146
+ The date the verifiable credential was issued, depending on version validFrom might be set instead.
147
+
148
+ ***
149
+
150
+ ### expirationDate?
151
+
152
+ > `optional` **expirationDate**: `string`
153
+
154
+ The date the verifiable credential expires, depending on version validUntil might be set instead.
@@ -0,0 +1,154 @@
1
+ # Interface: IDidVerifiableCredentialV2
2
+
3
+ Interface describing a verifiable credential.
4
+ https://www.w3.org/TR/vc-data-model-2.0
5
+
6
+ ## Extends
7
+
8
+ - [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md)
9
+
10
+ ## Properties
11
+
12
+ ### id?
13
+
14
+ > `optional` **id**: `string`
15
+
16
+ The identifier for the verifiable credential.
17
+
18
+ #### Inherited from
19
+
20
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`id`](IDidVerifiableCredentialCommon.md#id)
21
+
22
+ ***
23
+
24
+ ### type
25
+
26
+ > **type**: `string` \| `string`[]
27
+
28
+ The types of the data stored in the verifiable credential.
29
+
30
+ #### Inherited from
31
+
32
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`type`](IDidVerifiableCredentialCommon.md#type)
33
+
34
+ ***
35
+
36
+ ### credentialSubject?
37
+
38
+ > `optional` **credentialSubject**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
39
+
40
+ The data for the verifiable credential.
41
+
42
+ #### Inherited from
43
+
44
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`credentialSubject`](IDidVerifiableCredentialCommon.md#credentialsubject)
45
+
46
+ ***
47
+
48
+ ### credentialStatus?
49
+
50
+ > `optional` **credentialStatus**: [`IDidCredentialStatus`](IDidCredentialStatus.md) \| [`IDidCredentialStatus`](IDidCredentialStatus.md)[]
51
+
52
+ Used to discover information about the current status of the
53
+ verifiable credential, such as whether it is suspended or revoked.
54
+
55
+ #### Inherited from
56
+
57
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`credentialStatus`](IDidVerifiableCredentialCommon.md#credentialstatus)
58
+
59
+ ***
60
+
61
+ ### credentialSchema?
62
+
63
+ > `optional` **credentialSchema**: [`IDidCredentialSchema`](IDidCredentialSchema.md) \| [`IDidCredentialSchema`](IDidCredentialSchema.md)[]
64
+
65
+ Annotate type definitions or lock them to specific versions of the vocabulary.
66
+
67
+ #### Inherited from
68
+
69
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`credentialSchema`](IDidVerifiableCredentialCommon.md#credentialschema)
70
+
71
+ ***
72
+
73
+ ### issuer?
74
+
75
+ > `optional` **issuer**: `string` \| \{ `id`: `string`; `name?`: `string` \| [`IDidLabel`](IDidLabel.md)[]; `description?`: `string` \| [`IDidLabel`](IDidLabel.md)[]; \}
76
+
77
+ The issuing identity.
78
+
79
+ #### Inherited from
80
+
81
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`issuer`](IDidVerifiableCredentialCommon.md#issuer)
82
+
83
+ ***
84
+
85
+ ### name?
86
+
87
+ > `optional` **name**: `string` \| [`IDidLabel`](IDidLabel.md)[]
88
+
89
+ The name of the credential.
90
+
91
+ #### Inherited from
92
+
93
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`name`](IDidVerifiableCredentialCommon.md#name)
94
+
95
+ ***
96
+
97
+ ### description?
98
+
99
+ > `optional` **description**: `string` \| [`IDidLabel`](IDidLabel.md)[]
100
+
101
+ The description of the credential.
102
+
103
+ #### Inherited from
104
+
105
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`description`](IDidVerifiableCredentialCommon.md#description)
106
+
107
+ ***
108
+
109
+ ### evidence?
110
+
111
+ > `optional` **evidence**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
112
+
113
+ Evidence associated with the Credential.
114
+
115
+ #### Inherited from
116
+
117
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`evidence`](IDidVerifiableCredentialCommon.md#evidence)
118
+
119
+ ***
120
+
121
+ ### proof?
122
+
123
+ > `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
124
+
125
+ Proofs that the verifiable credential is valid.
126
+ Optional if a different proof method is used, such as JWT.
127
+
128
+ #### Inherited from
129
+
130
+ [`IDidVerifiableCredentialCommon`](IDidVerifiableCredentialCommon.md).[`proof`](IDidVerifiableCredentialCommon.md#proof)
131
+
132
+ ***
133
+
134
+ ### @context
135
+
136
+ > **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\]
137
+
138
+ The context for the verifiable credential.
139
+
140
+ ***
141
+
142
+ ### validFrom?
143
+
144
+ > `optional` **validFrom**: `string`
145
+
146
+ The date the verifiable credential is valid from.
147
+
148
+ ***
149
+
150
+ ### validUntil?
151
+
152
+ > `optional` **validUntil**: `string`
153
+
154
+ The date the verifiable credential is valid until.
@@ -1,16 +1,13 @@
1
- # Interface: IDidVerifiablePresentation
1
+ # Interface: IDidVerifiablePresentationCommon
2
2
 
3
3
  Interface describing a verifiable presentation.
4
4
 
5
- ## Properties
6
-
7
- ### @context
8
-
9
- > **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\]
5
+ ## Extended by
10
6
 
11
- The context for the verifiable presentation.
7
+ - [`IDidVerifiablePresentationV1`](IDidVerifiablePresentationV1.md)
8
+ - [`IDidVerifiablePresentationV2`](IDidVerifiablePresentationV2.md)
12
9
 
13
- ***
10
+ ## Properties
14
11
 
15
12
  ### id?
16
13
 
@@ -28,14 +25,6 @@ The types of the data stored in the verifiable credential.
28
25
 
29
26
  ***
30
27
 
31
- ### verifiableCredential?
32
-
33
- > `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredential`](IDidVerifiableCredential.md))[]
34
-
35
- The data for the verifiable credentials.
36
-
37
- ***
38
-
39
28
  ### holder?
40
29
 
41
30
  > `optional` **holder**: `string`
@@ -0,0 +1,72 @@
1
+ # Interface: IDidVerifiablePresentationV1
2
+
3
+ Interface describing a verifiable presentation.
4
+
5
+ ## Extends
6
+
7
+ - [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md)
8
+
9
+ ## Properties
10
+
11
+ ### id?
12
+
13
+ > `optional` **id**: `string`
14
+
15
+ Provide a unique identifier for the presentation.
16
+
17
+ #### Inherited from
18
+
19
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`id`](IDidVerifiablePresentationCommon.md#id)
20
+
21
+ ***
22
+
23
+ ### type
24
+
25
+ > **type**: `string` \| `string`[]
26
+
27
+ The types of the data stored in the verifiable credential.
28
+
29
+ #### Inherited from
30
+
31
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`type`](IDidVerifiablePresentationCommon.md#type)
32
+
33
+ ***
34
+
35
+ ### holder?
36
+
37
+ > `optional` **holder**: `string`
38
+
39
+ The entity generating the presentation.
40
+
41
+ #### Inherited from
42
+
43
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`holder`](IDidVerifiablePresentationCommon.md#holder)
44
+
45
+ ***
46
+
47
+ ### proof?
48
+
49
+ > `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
50
+
51
+ Proofs that the verifiable presentation is valid.
52
+ Optional if a different proof method is used, such as JWT.
53
+
54
+ #### Inherited from
55
+
56
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`proof`](IDidVerifiablePresentationCommon.md#proof)
57
+
58
+ ***
59
+
60
+ ### @context
61
+
62
+ > **@context**: `"https://www.w3.org/2018/credentials/v1"` \| \[`"https://www.w3.org/2018/credentials/v1"`, `...IJsonLdContextDefinitionElement[]`\]
63
+
64
+ The context for the verifiable presentation.
65
+
66
+ ***
67
+
68
+ ### verifiableCredential?
69
+
70
+ > `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredentialV1`](IDidVerifiableCredentialV1.md))[]
71
+
72
+ The data for the verifiable credentials.
@@ -0,0 +1,72 @@
1
+ # Interface: IDidVerifiablePresentationV2
2
+
3
+ Interface describing a verifiable presentation.
4
+
5
+ ## Extends
6
+
7
+ - [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md)
8
+
9
+ ## Properties
10
+
11
+ ### id?
12
+
13
+ > `optional` **id**: `string`
14
+
15
+ Provide a unique identifier for the presentation.
16
+
17
+ #### Inherited from
18
+
19
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`id`](IDidVerifiablePresentationCommon.md#id)
20
+
21
+ ***
22
+
23
+ ### type
24
+
25
+ > **type**: `string` \| `string`[]
26
+
27
+ The types of the data stored in the verifiable credential.
28
+
29
+ #### Inherited from
30
+
31
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`type`](IDidVerifiablePresentationCommon.md#type)
32
+
33
+ ***
34
+
35
+ ### holder?
36
+
37
+ > `optional` **holder**: `string`
38
+
39
+ The entity generating the presentation.
40
+
41
+ #### Inherited from
42
+
43
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`holder`](IDidVerifiablePresentationCommon.md#holder)
44
+
45
+ ***
46
+
47
+ ### proof?
48
+
49
+ > `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
50
+
51
+ Proofs that the verifiable presentation is valid.
52
+ Optional if a different proof method is used, such as JWT.
53
+
54
+ #### Inherited from
55
+
56
+ [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`proof`](IDidVerifiablePresentationCommon.md#proof)
57
+
58
+ ***
59
+
60
+ ### @context
61
+
62
+ > **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\]
63
+
64
+ The context for the verifiable presentation.
65
+
66
+ ***
67
+
68
+ ### verifiableCredential?
69
+
70
+ > `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredentialV2`](IDidVerifiableCredentialV2.md))[]
71
+
72
+ The data for the verifiable credentials.
@@ -0,0 +1,5 @@
1
+ # Type Alias: IDidVerifiableCredential
2
+
3
+ > **IDidVerifiableCredential** = [`IDidVerifiableCredentialV1`](../interfaces/IDidVerifiableCredentialV1.md) \| [`IDidVerifiableCredentialV2`](../interfaces/IDidVerifiableCredentialV2.md)
4
+
5
+ Interface describing a verifiable credential.
@@ -0,0 +1,5 @@
1
+ # Type Alias: IDidVerifiablePresentation
2
+
3
+ > **IDidVerifiablePresentation** = [`IDidVerifiablePresentationV1`](../interfaces/IDidVerifiablePresentationV1.md) \| [`IDidVerifiablePresentationV2`](../interfaces/IDidVerifiablePresentationV2.md)
4
+
5
+ Interface describing a verifiable presentation.
@@ -4,7 +4,7 @@
4
4
 
5
5
  The contexts for DIDs.
6
6
 
7
- ## Type declaration
7
+ ## Type Declaration
8
8
 
9
9
  ### Context
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  The types for DID Proof crypto suites.
6
6
 
7
- ## Type declaration
7
+ ## Type Declaration
8
8
 
9
9
  ### EdDSAJcs2022
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  The types for DIDs.
6
6
 
7
- ## Type declaration
7
+ ## Type Declaration
8
8
 
9
9
  ### VerifiableCredential
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  The types for proofs.
6
6
 
7
- ## Type declaration
7
+ ## Type Declaration
8
8
 
9
9
  ### DataIntegrityProof
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-w3c-did",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.10",
4
4
  "description": "Models which define the structure of W3C DID Standard",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,11 +14,11 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "^0.0.1",
18
- "@twin.org/crypto": "^0.0.1",
19
- "@twin.org/data-json-ld": "^0.0.1",
20
- "@twin.org/nameof": "^0.0.1",
21
- "@twin.org/web": "^0.0.1"
17
+ "@twin.org/core": "next",
18
+ "@twin.org/crypto": "next",
19
+ "@twin.org/data-json-ld": "next",
20
+ "@twin.org/nameof": "next",
21
+ "@twin.org/web": "next"
22
22
  },
23
23
  "main": "./dist/cjs/index.cjs",
24
24
  "module": "./dist/esm/index.mjs",