@twin.org/standards-w3c-did 0.0.1-next.15 → 0.0.1-next.17
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/cjs/index.cjs +20 -0
- package/dist/esm/index.mjs +20 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IDidProof.d.ts +3 -2
- package/dist/types/models/didCryptoSuites.d.ts +19 -0
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IDidProof.md +2 -2
- package/docs/reference/type-aliases/DidCryptoSuites.md +5 -0
- package/docs/reference/variables/DidCryptoSuites.md +21 -0
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -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;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -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 };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
|
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
package/docs/reference/index.md
CHANGED
|
@@ -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
|
-
>
|
|
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,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.
|
|
3
|
+
"version": "0.0.1-next.17",
|
|
4
4
|
"description": "Models which define the structure of W3C DID Standard",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"import": "./dist/esm/index.mjs",
|
|
27
27
|
"types": "./dist/types/index.d.ts"
|
|
28
28
|
},
|
|
29
|
-
"./locales": "./locales"
|
|
29
|
+
"./locales/*.json": "./locales/*.json"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist/cjs",
|