@twin.org/standards-w3c-did 0.0.1-next.27 → 0.0.1-next.28

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.
@@ -7,11 +7,12 @@ export * from "./models/IDidCredentialSchema";
7
7
  export * from "./models/IDidCredentialStatus";
8
8
  export * from "./models/IDidDocument";
9
9
  export * from "./models/IDidDocumentVerificationMethod";
10
+ export * from "./models/IDidLabel";
10
11
  export * from "./models/IDidPresentationVerification";
11
- export * from "./models/IJsonWebSignature2020Proof";
12
12
  export * from "./models/IDidService";
13
13
  export * from "./models/IDidVerifiableCredential";
14
14
  export * from "./models/IDidVerifiablePresentation";
15
+ export * from "./models/IJsonWebSignature2020Proof";
15
16
  export * from "./models/IMultikey";
16
17
  export * from "./models/IProofSignerVerifier";
17
18
  export * from "./models/proofTypes";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Interface describing a DID Label.
3
+ */
4
+ export interface IDidLabel {
5
+ /**
6
+ * The value for the label.
7
+ */
8
+ "@value": string;
9
+ /**
10
+ * The language for the label.
11
+ */
12
+ "@language": string;
13
+ /**
14
+ * The direction of the label.
15
+ */
16
+ "@direction"?: string;
17
+ }
@@ -3,6 +3,7 @@ import type { DidContexts } from "./didContexts";
3
3
  import type { IDataIntegrityProof } from "./IDataIntegrityProof";
4
4
  import type { IDidCredentialSchema } from "./IDidCredentialSchema";
5
5
  import type { IDidCredentialStatus } from "./IDidCredentialStatus";
6
+ import type { IDidLabel } from "./IDidLabel";
6
7
  import type { IJsonWebSignature2020Proof } from "./IJsonWebSignature2020Proof";
7
8
  /**
8
9
  * Interface describing a verifiable credential.
@@ -38,8 +39,9 @@ export interface IDidVerifiableCredential {
38
39
  * The issuing identity.
39
40
  */
40
41
  issuer?: string | {
41
- [key: string]: unknown;
42
42
  id: string;
43
+ name?: string | IDidLabel[];
44
+ description?: string | IDidLabel[];
43
45
  };
44
46
  /**
45
47
  * The date the verifiable credential was issued.
@@ -48,19 +50,11 @@ export interface IDidVerifiableCredential {
48
50
  /**
49
51
  * The name of the credential.
50
52
  */
51
- name?: string | {
52
- "@value": string;
53
- "@language": string;
54
- "@direction"?: string;
55
- }[];
53
+ name?: string | IDidLabel[];
56
54
  /**
57
55
  * The description of the credential.
58
56
  */
59
- description?: string | {
60
- "@value": string;
61
- "@language": string;
62
- "@direction"?: string;
63
- }[];
57
+ description?: string | IDidLabel[];
64
58
  /**
65
59
  * The date the verifiable credential is valid from.
66
60
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/standards-w3c-did - Changelog
2
2
 
3
- ## v0.0.1-next.27
3
+ ## v0.0.1-next.28
4
4
 
5
5
  - Initial Release
@@ -14,6 +14,7 @@
14
14
  - [IDidCredentialStatus](interfaces/IDidCredentialStatus.md)
15
15
  - [IDidDocument](interfaces/IDidDocument.md)
16
16
  - [IDidDocumentVerificationMethod](interfaces/IDidDocumentVerificationMethod.md)
17
+ - [IDidLabel](interfaces/IDidLabel.md)
17
18
  - [IDidPresentationVerification](interfaces/IDidPresentationVerification.md)
18
19
  - [IDidService](interfaces/IDidService.md)
19
20
  - [IDidVerifiableCredential](interfaces/IDidVerifiableCredential.md)
@@ -0,0 +1,27 @@
1
+ # Interface: IDidLabel
2
+
3
+ Interface describing a DID Label.
4
+
5
+ ## Properties
6
+
7
+ ### @value
8
+
9
+ > **@value**: `string`
10
+
11
+ The value for the label.
12
+
13
+ ***
14
+
15
+ ### @language
16
+
17
+ > **@language**: `string`
18
+
19
+ The language for the label.
20
+
21
+ ***
22
+
23
+ ### @direction?
24
+
25
+ > `optional` **@direction**: `string`
26
+
27
+ The direction of the label.
@@ -56,7 +56,7 @@ Annotate type definitions or lock them to specific versions of the vocabulary.
56
56
 
57
57
  ### issuer?
58
58
 
59
- > `optional` **issuer**: `string` \| \{ `[key: string]`: `unknown`; `id`: `string`; \}
59
+ > `optional` **issuer**: `string` \| \{ `id`: `string`; `name`: `string` \| [`IDidLabel`](IDidLabel.md)[]; `description`: `string` \| [`IDidLabel`](IDidLabel.md)[]; \}
60
60
 
61
61
  The issuing identity.
62
62
 
@@ -72,7 +72,7 @@ The date the verifiable credential was issued.
72
72
 
73
73
  ### name?
74
74
 
75
- > `optional` **name**: `string` \| `object`[]
75
+ > `optional` **name**: `string` \| [`IDidLabel`](IDidLabel.md)[]
76
76
 
77
77
  The name of the credential.
78
78
 
@@ -80,7 +80,7 @@ The name of the credential.
80
80
 
81
81
  ### description?
82
82
 
83
- > `optional` **description**: `string` \| `object`[]
83
+ > `optional` **description**: `string` \| [`IDidLabel`](IDidLabel.md)[]
84
84
 
85
85
  The description of the credential.
86
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-w3c-did",
3
- "version": "0.0.1-next.27",
3
+ "version": "0.0.1-next.28",
4
4
  "description": "Models which define the structure of W3C DID Standard",
5
5
  "repository": {
6
6
  "type": "git",