@twin.org/standards-w3c-did 0.0.1-next.21 → 0.0.1-next.22
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/dist/types/models/IDidDocument.d.ts +3 -2
- package/dist/types/models/IDidProof.d.ts +2 -1
- package/dist/types/models/IDidVerifiableCredential.d.ts +16 -3
- package/dist/types/models/IDidVerifiablePresentation.d.ts +2 -1
- package/docs/changelog.md +1 -1
- package/docs/reference/interfaces/IDidDocument.md +1 -1
- package/docs/reference/interfaces/IDidProof.md +1 -1
- package/docs/reference/interfaces/IDidVerifiableCredential.md +27 -2
- package/docs/reference/interfaces/IDidVerifiablePresentation.md +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { DidContexts } from "./didContexts";
|
|
2
3
|
import type { IDidDocumentVerificationMethod } from "./IDidDocumentVerificationMethod";
|
|
3
4
|
import type { IDidService } from "./IDidService";
|
|
4
5
|
/**
|
|
@@ -9,7 +10,7 @@ export interface IDidDocument {
|
|
|
9
10
|
/**
|
|
10
11
|
* The context for the document.
|
|
11
12
|
*/
|
|
12
|
-
"@context"?:
|
|
13
|
+
"@context"?: typeof DidContexts.Context | [typeof DidContexts.Context, IJsonLdContextDefinitionElement];
|
|
13
14
|
/**
|
|
14
15
|
* The id for the document.
|
|
15
16
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
1
2
|
import type { DidContexts } from "./didContexts";
|
|
2
3
|
import type { DidCryptoSuites } from "./didCryptoSuites";
|
|
3
4
|
import type { DidTypes } from "./didTypes";
|
|
@@ -9,7 +10,7 @@ export interface IDidProof {
|
|
|
9
10
|
/**
|
|
10
11
|
* JSON-LD Context.
|
|
11
12
|
*/
|
|
12
|
-
"@context": typeof DidContexts.ContextVCDataIntegrity | [typeof DidContexts.ContextVCDataIntegrity,
|
|
13
|
+
"@context": typeof DidContexts.ContextVCDataIntegrity | [typeof DidContexts.ContextVCDataIntegrity, IJsonLdContextDefinitionElement];
|
|
13
14
|
/**
|
|
14
15
|
* JSON-LD Type.
|
|
15
16
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
1
|
+
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { DidContexts } from "./didContexts";
|
|
3
3
|
import type { IDidCredentialStatus } from "./IDidCredentialStatus";
|
|
4
4
|
import type { IDidProof } from "./IDidProof";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing a verifiable credential.
|
|
7
|
+
* https://www.w3.org/TR/vc-data-model-2.0
|
|
7
8
|
*/
|
|
8
9
|
export interface IDidVerifiableCredential {
|
|
9
10
|
/**
|
|
10
11
|
* The context for the verifiable credential.
|
|
11
12
|
*/
|
|
12
|
-
"@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2,
|
|
13
|
+
"@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, IJsonLdContextDefinitionElement];
|
|
13
14
|
/**
|
|
14
15
|
* The identifier for the verifiable credential.
|
|
15
16
|
*/
|
|
@@ -17,7 +18,7 @@ export interface IDidVerifiableCredential {
|
|
|
17
18
|
/**
|
|
18
19
|
* The types of the data stored in the verifiable credential.
|
|
19
20
|
*/
|
|
20
|
-
type: string[];
|
|
21
|
+
type: string | string[];
|
|
21
22
|
/**
|
|
22
23
|
* The data for the verifiable credential.
|
|
23
24
|
*/
|
|
@@ -35,6 +36,18 @@ export interface IDidVerifiableCredential {
|
|
|
35
36
|
* The date the verifiable credential was issued.
|
|
36
37
|
*/
|
|
37
38
|
issuanceDate?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The date the verifiable credential is valid from.
|
|
41
|
+
*/
|
|
42
|
+
validFrom?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The date the verifiable credential is valid until.
|
|
45
|
+
*/
|
|
46
|
+
validUntil?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Evidence associated with the Credential.
|
|
49
|
+
*/
|
|
50
|
+
evidence?: IJsonLdNodeObject | IJsonLdNodeObject[];
|
|
38
51
|
/**
|
|
39
52
|
* Proofs that the verifiable credential is valid.
|
|
40
53
|
* Optional if a different proof method is used, such as JWT.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
1
2
|
import type { DidContexts } from "./didContexts";
|
|
2
3
|
import type { IDidProof } from "./IDidProof";
|
|
3
4
|
import type { IDidVerifiableCredential } from "./IDidVerifiableCredential";
|
|
@@ -8,7 +9,7 @@ export interface IDidVerifiablePresentation {
|
|
|
8
9
|
/**
|
|
9
10
|
* The context for the verifiable presentation.
|
|
10
11
|
*/
|
|
11
|
-
"@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2,
|
|
12
|
+
"@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, IJsonLdContextDefinitionElement];
|
|
12
13
|
/**
|
|
13
14
|
* Provide a unique identifier for the presentation.
|
|
14
15
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -7,7 +7,7 @@ Spec https://www.w3.org/TR/did-core/#did-document-properties.
|
|
|
7
7
|
|
|
8
8
|
### @context?
|
|
9
9
|
|
|
10
|
-
> `optional` **@context**: `
|
|
10
|
+
> `optional` **@context**: `"https://www.w3.org/ns/did/v1"` \| \[`"https://www.w3.org/ns/did/v1"`, `IJsonLdContextDefinitionElement`\]
|
|
11
11
|
|
|
12
12
|
The context for the document.
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ https://www.w3.org/TR/vc-data-integrity/
|
|
|
7
7
|
|
|
8
8
|
### @context
|
|
9
9
|
|
|
10
|
-
> **@context**: `"https://w3id.org/security/data-integrity/v2"` \| \[`"https://w3id.org/security/data-integrity/v2"`,
|
|
10
|
+
> **@context**: `"https://w3id.org/security/data-integrity/v2"` \| \[`"https://w3id.org/security/data-integrity/v2"`, `IJsonLdContextDefinitionElement`\]
|
|
11
11
|
|
|
12
12
|
JSON-LD Context.
|
|
13
13
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Interface: IDidVerifiableCredential
|
|
2
2
|
|
|
3
3
|
Interface describing a verifiable credential.
|
|
4
|
+
https://www.w3.org/TR/vc-data-model-2.0
|
|
4
5
|
|
|
5
6
|
## Properties
|
|
6
7
|
|
|
7
8
|
### @context
|
|
8
9
|
|
|
9
|
-
> **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`,
|
|
10
|
+
> **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `IJsonLdContextDefinitionElement`\]
|
|
10
11
|
|
|
11
12
|
The context for the verifiable credential.
|
|
12
13
|
|
|
@@ -22,7 +23,7 @@ The identifier for the verifiable credential.
|
|
|
22
23
|
|
|
23
24
|
### type
|
|
24
25
|
|
|
25
|
-
> **type**: `string`[]
|
|
26
|
+
> **type**: `string` \| `string`[]
|
|
26
27
|
|
|
27
28
|
The types of the data stored in the verifiable credential.
|
|
28
29
|
|
|
@@ -61,6 +62,30 @@ The date the verifiable credential was issued.
|
|
|
61
62
|
|
|
62
63
|
***
|
|
63
64
|
|
|
65
|
+
### validFrom?
|
|
66
|
+
|
|
67
|
+
> `optional` **validFrom**: `string`
|
|
68
|
+
|
|
69
|
+
The date the verifiable credential is valid from.
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### validUntil?
|
|
74
|
+
|
|
75
|
+
> `optional` **validUntil**: `string`
|
|
76
|
+
|
|
77
|
+
The date the verifiable credential is valid until.
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### evidence?
|
|
82
|
+
|
|
83
|
+
> `optional` **evidence**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
|
|
84
|
+
|
|
85
|
+
Evidence associated with the Credential.
|
|
86
|
+
|
|
87
|
+
***
|
|
88
|
+
|
|
64
89
|
### proof?
|
|
65
90
|
|
|
66
91
|
> `optional` **proof**: [`IDidProof`](IDidProof.md) \| [`IDidProof`](IDidProof.md)[]
|
|
@@ -6,7 +6,7 @@ Interface describing a verifiable presentation.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`,
|
|
9
|
+
> **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `IJsonLdContextDefinitionElement`\]
|
|
10
10
|
|
|
11
11
|
The context for the verifiable presentation.
|
|
12
12
|
|