@twin.org/standards-w3c-did 0.0.1-next.11 → 0.0.1-next.13

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,14 +7,30 @@
7
7
  */
8
8
  // eslint-disable-next-line @typescript-eslint/naming-convention
9
9
  const DidContexts = {
10
+ /**
11
+ * The context root for DID.
12
+ */
13
+ Context: "https://www.w3.org/ns/did/v1",
10
14
  /**
11
15
  * The context root for DID VC v1.
12
16
  */
13
- ContextV1: "https://www.w3.org/2018/credentials/v1",
17
+ ContextVCv1: "https://www.w3.org/2018/credentials/v1",
14
18
  /**
15
19
  * The context root for DID VC v2.
16
20
  */
17
- ContextV2: "https://www.w3.org/ns/credentials/v2"
21
+ ContextVCv2: "https://www.w3.org/ns/credentials/v2",
22
+ /**
23
+ * The context root for security ed25519 suites.
24
+ */
25
+ ContextSecurityEd25519: "https://w3id.org/security/suites/ed25519-2020/v1",
26
+ /**
27
+ * The context root for security jws-2020 suites.
28
+ */
29
+ ContextSecurityJws2020: "https://w3id.org/security/suites/jws-2020/v1",
30
+ /**
31
+ * The context root for VC Data Integrity.
32
+ */
33
+ ContextVCDataIntegrity: "https://w3id.org/security/data-integrity/v2"
18
34
  };
19
35
 
20
36
  // Copyright 2024 IOTA Stiftung.
@@ -31,7 +47,23 @@ const DidTypes = {
31
47
  /**
32
48
  * The type for Verifiable Presentation.
33
49
  */
34
- VerifiablePresentation: "VerifiablePresentation"
50
+ VerifiablePresentation: "VerifiablePresentation",
51
+ /**
52
+ * The type for Data Integrity Proof.
53
+ */
54
+ DataIntegrityProof: "DataIntegrityProof",
55
+ /**
56
+ * The type for Ed25519VerificationKey2020.
57
+ */
58
+ Ed25519VerificationKey2020: "Ed25519VerificationKey2020",
59
+ /**
60
+ * The type for JsonWebKey2020.
61
+ */
62
+ JsonWebKey2020: "JsonWebKey2020",
63
+ /**
64
+ * The type for LinkedDomains.
65
+ */
66
+ LinkedDomains: "LinkedDomains"
35
67
  };
36
68
 
37
69
  /**
@@ -5,14 +5,30 @@
5
5
  */
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  const DidContexts = {
8
+ /**
9
+ * The context root for DID.
10
+ */
11
+ Context: "https://www.w3.org/ns/did/v1",
8
12
  /**
9
13
  * The context root for DID VC v1.
10
14
  */
11
- ContextV1: "https://www.w3.org/2018/credentials/v1",
15
+ ContextVCv1: "https://www.w3.org/2018/credentials/v1",
12
16
  /**
13
17
  * The context root for DID VC v2.
14
18
  */
15
- ContextV2: "https://www.w3.org/ns/credentials/v2"
19
+ ContextVCv2: "https://www.w3.org/ns/credentials/v2",
20
+ /**
21
+ * The context root for security ed25519 suites.
22
+ */
23
+ ContextSecurityEd25519: "https://w3id.org/security/suites/ed25519-2020/v1",
24
+ /**
25
+ * The context root for security jws-2020 suites.
26
+ */
27
+ ContextSecurityJws2020: "https://w3id.org/security/suites/jws-2020/v1",
28
+ /**
29
+ * The context root for VC Data Integrity.
30
+ */
31
+ ContextVCDataIntegrity: "https://w3id.org/security/data-integrity/v2"
16
32
  };
17
33
 
18
34
  // Copyright 2024 IOTA Stiftung.
@@ -29,7 +45,23 @@ const DidTypes = {
29
45
  /**
30
46
  * The type for Verifiable Presentation.
31
47
  */
32
- VerifiablePresentation: "VerifiablePresentation"
48
+ VerifiablePresentation: "VerifiablePresentation",
49
+ /**
50
+ * The type for Data Integrity Proof.
51
+ */
52
+ DataIntegrityProof: "DataIntegrityProof",
53
+ /**
54
+ * The type for Ed25519VerificationKey2020.
55
+ */
56
+ Ed25519VerificationKey2020: "Ed25519VerificationKey2020",
57
+ /**
58
+ * The type for JsonWebKey2020.
59
+ */
60
+ JsonWebKey2020: "JsonWebKey2020",
61
+ /**
62
+ * The type for LinkedDomains.
63
+ */
64
+ LinkedDomains: "LinkedDomains"
33
65
  };
34
66
 
35
67
  /**
@@ -1,3 +1,4 @@
1
+ import type { IJsonLdContextDefinitionRoot } from "@twin.org/data-json-ld";
1
2
  import type { IDidDocumentVerificationMethod } from "./IDidDocumentVerificationMethod";
2
3
  import type { IDidService } from "./IDidService";
3
4
  /**
@@ -5,6 +6,10 @@ import type { IDidService } from "./IDidService";
5
6
  * Spec https://www.w3.org/TR/did-core/#did-document-properties.
6
7
  */
7
8
  export interface IDidDocument {
9
+ /**
10
+ * The context for the document.
11
+ */
12
+ "@context"?: IJsonLdContextDefinitionRoot;
8
13
  /**
9
14
  * The id for the document.
10
15
  */
@@ -4,13 +4,17 @@
4
4
  */
5
5
  export interface IDidProof {
6
6
  /**
7
- * The id of the proof.
7
+ * JSON-LD Context.
8
8
  */
9
- id?: string;
9
+ "@context"?: string;
10
10
  /**
11
- * The type of the proof.
11
+ * JSON-LD Type.
12
12
  */
13
13
  type: string;
14
+ /**
15
+ * The id of the proof.
16
+ */
17
+ id?: string;
14
18
  /**
15
19
  * The purpose of the proof.
16
20
  */
@@ -2,14 +2,30 @@
2
2
  * The contexts for DIDs.
3
3
  */
4
4
  export declare const DidContexts: {
5
+ /**
6
+ * The context root for DID.
7
+ */
8
+ readonly Context: "https://www.w3.org/ns/did/v1";
5
9
  /**
6
10
  * The context root for DID VC v1.
7
11
  */
8
- readonly ContextV1: "https://www.w3.org/2018/credentials/v1";
12
+ readonly ContextVCv1: "https://www.w3.org/2018/credentials/v1";
9
13
  /**
10
14
  * The context root for DID VC v2.
11
15
  */
12
- readonly ContextV2: "https://www.w3.org/ns/credentials/v2";
16
+ readonly ContextVCv2: "https://www.w3.org/ns/credentials/v2";
17
+ /**
18
+ * The context root for security ed25519 suites.
19
+ */
20
+ readonly ContextSecurityEd25519: "https://w3id.org/security/suites/ed25519-2020/v1";
21
+ /**
22
+ * The context root for security jws-2020 suites.
23
+ */
24
+ readonly ContextSecurityJws2020: "https://w3id.org/security/suites/jws-2020/v1";
25
+ /**
26
+ * The context root for VC Data Integrity.
27
+ */
28
+ readonly ContextVCDataIntegrity: "https://w3id.org/security/data-integrity/v2";
13
29
  };
14
30
  /**
15
31
  * The contexts for DIDs.
@@ -10,6 +10,22 @@ export declare const DidTypes: {
10
10
  * The type for Verifiable Presentation.
11
11
  */
12
12
  readonly VerifiablePresentation: "VerifiablePresentation";
13
+ /**
14
+ * The type for Data Integrity Proof.
15
+ */
16
+ readonly DataIntegrityProof: "DataIntegrityProof";
17
+ /**
18
+ * The type for Ed25519VerificationKey2020.
19
+ */
20
+ readonly Ed25519VerificationKey2020: "Ed25519VerificationKey2020";
21
+ /**
22
+ * The type for JsonWebKey2020.
23
+ */
24
+ readonly JsonWebKey2020: "JsonWebKey2020";
25
+ /**
26
+ * The type for LinkedDomains.
27
+ */
28
+ readonly LinkedDomains: "LinkedDomains";
13
29
  };
14
30
  /**
15
31
  * The types for DIDs.
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/standards-w3c-did - Changelog
2
2
 
3
- ## v0.0.1-next.11
3
+ ## v0.0.1-next.13
4
4
 
5
5
  - Initial Release
@@ -5,6 +5,14 @@ Spec https://www.w3.org/TR/did-core/#did-document-properties.
5
5
 
6
6
  ## Properties
7
7
 
8
+ ### @context?
9
+
10
+ > `optional` **@context**: `IJsonLdContextDefinitionRoot`
11
+
12
+ The context for the document.
13
+
14
+ ***
15
+
8
16
  ### id
9
17
 
10
18
  > **id**: `string`
@@ -5,11 +5,11 @@ https://www.w3.org/TR/vc-data-integrity/
5
5
 
6
6
  ## Properties
7
7
 
8
- ### id?
8
+ ### @context?
9
9
 
10
- > `optional` **id**: `string`
10
+ > `optional` **@context**: `string`
11
11
 
12
- The id of the proof.
12
+ JSON-LD Context.
13
13
 
14
14
  ***
15
15
 
@@ -17,7 +17,15 @@ The id of the proof.
17
17
 
18
18
  > **type**: `string`
19
19
 
20
- The type of the proof.
20
+ JSON-LD Type.
21
+
22
+ ***
23
+
24
+ ### id?
25
+
26
+ > `optional` **id**: `string`
27
+
28
+ The id of the proof.
21
29
 
22
30
  ***
23
31
 
@@ -6,14 +6,38 @@ The contexts for DIDs.
6
6
 
7
7
  ## Type declaration
8
8
 
9
- ### ContextV1
9
+ ### Context
10
10
 
11
- > `readonly` **ContextV1**: `"https://www.w3.org/2018/credentials/v1"` = `"https://www.w3.org/2018/credentials/v1"`
11
+ > `readonly` **Context**: `"https://www.w3.org/ns/did/v1"` = `"https://www.w3.org/ns/did/v1"`
12
+
13
+ The context root for DID.
14
+
15
+ ### ContextVCv1
16
+
17
+ > `readonly` **ContextVCv1**: `"https://www.w3.org/2018/credentials/v1"` = `"https://www.w3.org/2018/credentials/v1"`
12
18
 
13
19
  The context root for DID VC v1.
14
20
 
15
- ### ContextV2
21
+ ### ContextVCv2
16
22
 
17
- > `readonly` **ContextV2**: `"https://www.w3.org/ns/credentials/v2"` = `"https://www.w3.org/ns/credentials/v2"`
23
+ > `readonly` **ContextVCv2**: `"https://www.w3.org/ns/credentials/v2"` = `"https://www.w3.org/ns/credentials/v2"`
18
24
 
19
25
  The context root for DID VC v2.
26
+
27
+ ### ContextSecurityEd25519
28
+
29
+ > `readonly` **ContextSecurityEd25519**: `"https://w3id.org/security/suites/ed25519-2020/v1"` = `"https://w3id.org/security/suites/ed25519-2020/v1"`
30
+
31
+ The context root for security ed25519 suites.
32
+
33
+ ### ContextSecurityJws2020
34
+
35
+ > `readonly` **ContextSecurityJws2020**: `"https://w3id.org/security/suites/jws-2020/v1"` = `"https://w3id.org/security/suites/jws-2020/v1"`
36
+
37
+ The context root for security jws-2020 suites.
38
+
39
+ ### ContextVCDataIntegrity
40
+
41
+ > `readonly` **ContextVCDataIntegrity**: `"https://w3id.org/security/data-integrity/v2"` = `"https://w3id.org/security/data-integrity/v2"`
42
+
43
+ The context root for VC Data Integrity.
@@ -17,3 +17,27 @@ The type for Verifiable Credential.
17
17
  > `readonly` **VerifiablePresentation**: `"VerifiablePresentation"` = `"VerifiablePresentation"`
18
18
 
19
19
  The type for Verifiable Presentation.
20
+
21
+ ### DataIntegrityProof
22
+
23
+ > `readonly` **DataIntegrityProof**: `"DataIntegrityProof"` = `"DataIntegrityProof"`
24
+
25
+ The type for Data Integrity Proof.
26
+
27
+ ### Ed25519VerificationKey2020
28
+
29
+ > `readonly` **Ed25519VerificationKey2020**: `"Ed25519VerificationKey2020"` = `"Ed25519VerificationKey2020"`
30
+
31
+ The type for Ed25519VerificationKey2020.
32
+
33
+ ### JsonWebKey2020
34
+
35
+ > `readonly` **JsonWebKey2020**: `"JsonWebKey2020"` = `"JsonWebKey2020"`
36
+
37
+ The type for JsonWebKey2020.
38
+
39
+ ### LinkedDomains
40
+
41
+ > `readonly` **LinkedDomains**: `"LinkedDomains"` = `"LinkedDomains"`
42
+
43
+ The type for LinkedDomains.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-w3c-did",
3
- "version": "0.0.1-next.11",
3
+ "version": "0.0.1-next.13",
4
4
  "description": "Models which define the structure of W3C DID Standard",
5
5
  "repository": {
6
6
  "type": "git",