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

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.
@@ -33,6 +33,25 @@ const DidContexts = {
33
33
  ContextVCDataIntegrity: "https://w3id.org/security/data-integrity/v2"
34
34
  };
35
35
 
36
+ // Copyright 2024 IOTA Stiftung.
37
+ // SPDX-License-Identifier: Apache-2.0.
38
+ /**
39
+ * The types for DID Proof crypto suites.
40
+ */
41
+ // eslint-disable-next-line @typescript-eslint/naming-convention
42
+ const DidCryptoSuites = {
43
+ /**
44
+ * The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785].
45
+ * https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022
46
+ */
47
+ EdDSAJcs2022: "eddsa-jcs-2022",
48
+ /**
49
+ * The type for EdDSA crypto suite for RDF Dataset Canonicalization.
50
+ * https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022
51
+ */
52
+ EdDSARdfc2022: "eddsa-rdfc-2022"
53
+ };
54
+
36
55
  // Copyright 2024 IOTA Stiftung.
37
56
  // SPDX-License-Identifier: Apache-2.0.
38
57
  /**
@@ -98,5 +117,6 @@ const DidVerificationMethodType = {
98
117
  };
99
118
 
100
119
  exports.DidContexts = DidContexts;
120
+ exports.DidCryptoSuites = DidCryptoSuites;
101
121
  exports.DidTypes = DidTypes;
102
122
  exports.DidVerificationMethodType = DidVerificationMethodType;
@@ -31,6 +31,25 @@ const DidContexts = {
31
31
  ContextVCDataIntegrity: "https://w3id.org/security/data-integrity/v2"
32
32
  };
33
33
 
34
+ // Copyright 2024 IOTA Stiftung.
35
+ // SPDX-License-Identifier: Apache-2.0.
36
+ /**
37
+ * The types for DID Proof crypto suites.
38
+ */
39
+ // eslint-disable-next-line @typescript-eslint/naming-convention
40
+ const DidCryptoSuites = {
41
+ /**
42
+ * The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785].
43
+ * https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022
44
+ */
45
+ EdDSAJcs2022: "eddsa-jcs-2022",
46
+ /**
47
+ * The type for EdDSA crypto suite for RDF Dataset Canonicalization.
48
+ * https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022
49
+ */
50
+ EdDSARdfc2022: "eddsa-rdfc-2022"
51
+ };
52
+
34
53
  // Copyright 2024 IOTA Stiftung.
35
54
  // SPDX-License-Identifier: Apache-2.0.
36
55
  /**
@@ -95,4 +114,4 @@ const DidVerificationMethodType = {
95
114
  CapabilityDelegation: "capabilityDelegation"
96
115
  };
97
116
 
98
- export { DidContexts, DidTypes, DidVerificationMethodType };
117
+ export { DidContexts, DidCryptoSuites, DidTypes, DidVerificationMethodType };
@@ -1,4 +1,5 @@
1
1
  export * from "./models/didContexts";
2
+ export * from "./models/didCryptoSuites";
2
3
  export * from "./models/didTypes";
3
4
  export * from "./models/didVerificationMethodType";
4
5
  export * from "./models/IDidCredentialStatus";
@@ -1,4 +1,5 @@
1
1
  import type { DidContexts } from "./didContexts";
2
+ import type { DidCryptoSuites } from "./didCryptoSuites";
2
3
  import type { DidTypes } from "./didTypes";
3
4
  /**
4
5
  * Interface describing a did proof.
@@ -16,7 +17,7 @@ export interface IDidProof {
16
17
  /**
17
18
  * An identifier for the cryptographic suite that can be used to verify the proof.
18
19
  */
19
- cryptosuite: string;
20
+ cryptosuite: DidCryptoSuites | string;
20
21
  /**
21
22
  * The id of the proof.
22
23
  */
@@ -29,7 +30,7 @@ export interface IDidProof {
29
30
  * Contains the base-encoded binary data necessary to verify the
30
31
  * digital proof using the verificationMethod specified.
31
32
  */
32
- proofValue?: string;
33
+ proofValue: string;
33
34
  /**
34
35
  * The verification method of the proof.
35
36
  */
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The types for DID Proof crypto suites.
3
+ */
4
+ export declare const DidCryptoSuites: {
5
+ /**
6
+ * The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785].
7
+ * https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022
8
+ */
9
+ readonly EdDSAJcs2022: "eddsa-jcs-2022";
10
+ /**
11
+ * The type for EdDSA crypto suite for RDF Dataset Canonicalization.
12
+ * https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022
13
+ */
14
+ readonly EdDSARdfc2022: "eddsa-rdfc-2022";
15
+ };
16
+ /**
17
+ * The types for DID Proof crypto suites.
18
+ */
19
+ export type DidCryptoSuites = (typeof DidCryptoSuites)[keyof typeof DidCryptoSuites];
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/standards-w3c-did - Changelog
2
2
 
3
- ## v0.0.1-next.15
3
+ ## v0.0.1-next.16
4
4
 
5
5
  - Initial Release
@@ -14,11 +14,13 @@
14
14
  ## Type Aliases
15
15
 
16
16
  - [DidContexts](type-aliases/DidContexts.md)
17
+ - [DidCryptoSuites](type-aliases/DidCryptoSuites.md)
17
18
  - [DidTypes](type-aliases/DidTypes.md)
18
19
  - [DidVerificationMethodType](type-aliases/DidVerificationMethodType.md)
19
20
 
20
21
  ## Variables
21
22
 
22
23
  - [DidContexts](variables/DidContexts.md)
24
+ - [DidCryptoSuites](variables/DidCryptoSuites.md)
23
25
  - [DidTypes](variables/DidTypes.md)
24
26
  - [DidVerificationMethodType](variables/DidVerificationMethodType.md)
@@ -45,9 +45,9 @@ The reason the proof was created.
45
45
 
46
46
  ***
47
47
 
48
- ### proofValue?
48
+ ### proofValue
49
49
 
50
- > `optional` **proofValue**: `string`
50
+ > **proofValue**: `string`
51
51
 
52
52
  Contains the base-encoded binary data necessary to verify the
53
53
  digital proof using the verificationMethod specified.
@@ -0,0 +1,5 @@
1
+ # Type Alias: DidCryptoSuites
2
+
3
+ > **DidCryptoSuites**: *typeof* [`DidCryptoSuites`](../variables/DidCryptoSuites.md)\[keyof *typeof* [`DidCryptoSuites`](../variables/DidCryptoSuites.md)\]
4
+
5
+ The types for DID Proof crypto suites.
@@ -0,0 +1,21 @@
1
+ # Variable: DidCryptoSuites
2
+
3
+ > `const` **DidCryptoSuites**: `object`
4
+
5
+ The types for DID Proof crypto suites.
6
+
7
+ ## Type declaration
8
+
9
+ ### EdDSAJcs2022
10
+
11
+ > `readonly` **EdDSAJcs2022**: `"eddsa-jcs-2022"` = `"eddsa-jcs-2022"`
12
+
13
+ The type for EdDSA crypto suite for JSON Canonicalization Scheme [RFC8785].
14
+ https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022
15
+
16
+ ### EdDSARdfc2022
17
+
18
+ > `readonly` **EdDSARdfc2022**: `"eddsa-rdfc-2022"` = `"eddsa-rdfc-2022"`
19
+
20
+ The type for EdDSA crypto suite for RDF Dataset Canonicalization.
21
+ https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-w3c-did",
3
- "version": "0.0.1-next.15",
3
+ "version": "0.0.1-next.16",
4
4
  "description": "Models which define the structure of W3C DID Standard",
5
5
  "repository": {
6
6
  "type": "git",