@twin.org/standards-w3c-did 0.0.1-next.14 → 0.0.1-next.15

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.
@@ -8,7 +8,7 @@ export interface IDidProof {
8
8
  /**
9
9
  * JSON-LD Context.
10
10
  */
11
- "@context"?: typeof DidContexts.ContextVCDataIntegrity | [typeof DidContexts.ContextVCDataIntegrity, ...string[]];
11
+ "@context": typeof DidContexts.ContextVCDataIntegrity | [typeof DidContexts.ContextVCDataIntegrity, ...string[]];
12
12
  /**
13
13
  * JSON-LD Type.
14
14
  */
@@ -1,14 +1,15 @@
1
- import type { IJsonLdContextDefinitionRoot, IJsonLdObject } from "@twin.org/data-json-ld";
1
+ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
+ import type { DidContexts } from "./didContexts";
2
3
  import type { IDidCredentialStatus } from "./IDidCredentialStatus";
3
4
  import type { IDidProof } from "./IDidProof";
4
5
  /**
5
6
  * Interface describing a verifiable credential.
6
7
  */
7
- export interface IDidVerifiableCredential<T extends IJsonLdObject = IJsonLdObject> {
8
+ export interface IDidVerifiableCredential {
8
9
  /**
9
10
  * The context for the verifiable credential.
10
11
  */
11
- "@context": IJsonLdContextDefinitionRoot;
12
+ "@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...string[]];
12
13
  /**
13
14
  * The identifier for the verifiable credential.
14
15
  */
@@ -20,7 +21,7 @@ export interface IDidVerifiableCredential<T extends IJsonLdObject = IJsonLdObjec
20
21
  /**
21
22
  * The data for the verifiable credential.
22
23
  */
23
- credentialSubject: T | T[];
24
+ credentialSubject: IJsonLdNodeObject | IJsonLdNodeObject[];
24
25
  /**
25
26
  * Used to discover information about the current status of the
26
27
  * verifiable credential, such as whether it is suspended or revoked.
@@ -1,14 +1,14 @@
1
- import type { IJsonLdContextDefinitionRoot, IJsonLdObject } from "@twin.org/data-json-ld";
1
+ import type { DidContexts } from "./didContexts";
2
2
  import type { IDidProof } from "./IDidProof";
3
3
  import type { IDidVerifiableCredential } from "./IDidVerifiableCredential";
4
4
  /**
5
5
  * Interface describing a verifiable presentation.
6
6
  */
7
- export interface IDidVerifiablePresentation<T extends IJsonLdObject = IJsonLdObject> {
7
+ export interface IDidVerifiablePresentation {
8
8
  /**
9
- * The context for the verifiable credential.
9
+ * The context for the verifiable presentation.
10
10
  */
11
- "@context": IJsonLdContextDefinitionRoot;
11
+ "@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...string[]];
12
12
  /**
13
13
  * Provide a unique identifier for the presentation.
14
14
  */
@@ -20,7 +20,7 @@ export interface IDidVerifiablePresentation<T extends IJsonLdObject = IJsonLdObj
20
20
  /**
21
21
  * The data for the verifiable credentials.
22
22
  */
23
- verifiableCredential: (string | IDidVerifiableCredential<T>)[];
23
+ verifiableCredential: (string | IDidVerifiableCredential)[];
24
24
  /**
25
25
  * The entity generating the presentation.
26
26
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/standards-w3c-did - Changelog
2
2
 
3
- ## v0.0.1-next.14
3
+ ## v0.0.1-next.15
4
4
 
5
5
  - Initial Release
@@ -5,9 +5,9 @@ https://www.w3.org/TR/vc-data-integrity/
5
5
 
6
6
  ## Properties
7
7
 
8
- ### @context?
8
+ ### @context
9
9
 
10
- > `optional` **@context**: `"https://w3id.org/security/data-integrity/v2"` \| [`"https://w3id.org/security/data-integrity/v2"`, `...string[]`]
10
+ > **@context**: `"https://w3id.org/security/data-integrity/v2"` \| [`"https://w3id.org/security/data-integrity/v2"`, `...string[]`]
11
11
 
12
12
  JSON-LD Context.
13
13
 
@@ -1,16 +1,12 @@
1
- # Interface: IDidVerifiableCredential\<T\>
1
+ # Interface: IDidVerifiableCredential
2
2
 
3
3
  Interface describing a verifiable credential.
4
4
 
5
- ## Type Parameters
6
-
7
- • **T** *extends* `IJsonLdObject` = `IJsonLdObject`
8
-
9
5
  ## Properties
10
6
 
11
7
  ### @context
12
8
 
13
- > **@context**: `IJsonLdContextDefinitionRoot`
9
+ > **@context**: `"https://www.w3.org/ns/credentials/v2"` \| [`"https://www.w3.org/ns/credentials/v2"`, `...string[]`]
14
10
 
15
11
  The context for the verifiable credential.
16
12
 
@@ -34,7 +30,7 @@ The types of the data stored in the verifiable credential.
34
30
 
35
31
  ### credentialSubject
36
32
 
37
- > **credentialSubject**: `T` \| `T`[]
33
+ > **credentialSubject**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
38
34
 
39
35
  The data for the verifiable credential.
40
36
 
@@ -1,18 +1,14 @@
1
- # Interface: IDidVerifiablePresentation\<T\>
1
+ # Interface: IDidVerifiablePresentation
2
2
 
3
3
  Interface describing a verifiable presentation.
4
4
 
5
- ## Type Parameters
6
-
7
- • **T** *extends* `IJsonLdObject` = `IJsonLdObject`
8
-
9
5
  ## Properties
10
6
 
11
7
  ### @context
12
8
 
13
- > **@context**: `IJsonLdContextDefinitionRoot`
9
+ > **@context**: `"https://www.w3.org/ns/credentials/v2"` \| [`"https://www.w3.org/ns/credentials/v2"`, `...string[]`]
14
10
 
15
- The context for the verifiable credential.
11
+ The context for the verifiable presentation.
16
12
 
17
13
  ***
18
14
 
@@ -34,7 +30,7 @@ The types of the data stored in the verifiable credential.
34
30
 
35
31
  ### verifiableCredential
36
32
 
37
- > **verifiableCredential**: (`string` \| [`IDidVerifiableCredential`](IDidVerifiableCredential.md)\<`T`\>)[]
33
+ > **verifiableCredential**: (`string` \| [`IDidVerifiableCredential`](IDidVerifiableCredential.md))[]
38
34
 
39
35
  The data for the verifiable credentials.
40
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-w3c-did",
3
- "version": "0.0.1-next.14",
3
+ "version": "0.0.1-next.15",
4
4
  "description": "Models which define the structure of W3C DID Standard",
5
5
  "repository": {
6
6
  "type": "git",