@twin.org/standards-w3c-did 0.0.1-next.6 → 0.0.1-next.8
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 +36 -0
- package/dist/esm/index.mjs +35 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/models/didContexts.d.ts +17 -0
- package/dist/types/models/didTypes.d.ts +17 -0
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +4 -0
- package/docs/reference/type-aliases/DidContexts.md +5 -0
- package/docs/reference/type-aliases/DidTypes.md +5 -0
- package/docs/reference/variables/DidContexts.md +19 -0
- package/docs/reference/variables/DidTypes.md +19 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// Copyright 2024 IOTA Stiftung.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
5
|
+
/**
|
|
6
|
+
* The contexts for DIDs.
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
const DidContexts = {
|
|
10
|
+
/**
|
|
11
|
+
* The context root for DID VC v1.
|
|
12
|
+
*/
|
|
13
|
+
ContextV1: "https://www.w3.org/2018/credentials/v1",
|
|
14
|
+
/**
|
|
15
|
+
* The context root for DID VC v2.
|
|
16
|
+
*/
|
|
17
|
+
ContextV2: "https://www.w3.org/ns/credentials/v2"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Copyright 2024 IOTA Stiftung.
|
|
21
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
22
|
+
/**
|
|
23
|
+
* The types for DIDs.
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
26
|
+
const DidTypes = {
|
|
27
|
+
/**
|
|
28
|
+
* The type for Verifiable Credential.
|
|
29
|
+
*/
|
|
30
|
+
VerifiableCredential: "VerifiableCredential",
|
|
31
|
+
/**
|
|
32
|
+
* The type for Verifiable Presentation.
|
|
33
|
+
*/
|
|
34
|
+
VerifiablePresentation: "VerifiablePresentation"
|
|
35
|
+
};
|
|
36
|
+
|
|
3
37
|
/**
|
|
4
38
|
* The types of verification method.
|
|
5
39
|
*/
|
|
@@ -31,4 +65,6 @@ const DidVerificationMethodType = {
|
|
|
31
65
|
CapabilityDelegation: "capabilityDelegation"
|
|
32
66
|
};
|
|
33
67
|
|
|
68
|
+
exports.DidContexts = DidContexts;
|
|
69
|
+
exports.DidTypes = DidTypes;
|
|
34
70
|
exports.DidVerificationMethodType = DidVerificationMethodType;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The contexts for DIDs.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
const DidContexts = {
|
|
8
|
+
/**
|
|
9
|
+
* The context root for DID VC v1.
|
|
10
|
+
*/
|
|
11
|
+
ContextV1: "https://www.w3.org/2018/credentials/v1",
|
|
12
|
+
/**
|
|
13
|
+
* The context root for DID VC v2.
|
|
14
|
+
*/
|
|
15
|
+
ContextV2: "https://www.w3.org/ns/credentials/v2"
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Copyright 2024 IOTA Stiftung.
|
|
19
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
20
|
+
/**
|
|
21
|
+
* The types for DIDs.
|
|
22
|
+
*/
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
24
|
+
const DidTypes = {
|
|
25
|
+
/**
|
|
26
|
+
* The type for Verifiable Credential.
|
|
27
|
+
*/
|
|
28
|
+
VerifiableCredential: "VerifiableCredential",
|
|
29
|
+
/**
|
|
30
|
+
* The type for Verifiable Presentation.
|
|
31
|
+
*/
|
|
32
|
+
VerifiablePresentation: "VerifiablePresentation"
|
|
33
|
+
};
|
|
34
|
+
|
|
1
35
|
/**
|
|
2
36
|
* The types of verification method.
|
|
3
37
|
*/
|
|
@@ -29,4 +63,4 @@ const DidVerificationMethodType = {
|
|
|
29
63
|
CapabilityDelegation: "capabilityDelegation"
|
|
30
64
|
};
|
|
31
65
|
|
|
32
|
-
export { DidVerificationMethodType };
|
|
66
|
+
export { DidContexts, DidTypes, DidVerificationMethodType };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from "./models/didContexts";
|
|
2
|
+
export * from "./models/didTypes";
|
|
3
|
+
export * from "./models/didVerificationMethodType";
|
|
1
4
|
export * from "./models/IDidCredentialStatus";
|
|
2
5
|
export * from "./models/IDidDocument";
|
|
3
6
|
export * from "./models/IDidDocumentVerificationMethod";
|
|
@@ -6,4 +9,3 @@ export * from "./models/IDidProof";
|
|
|
6
9
|
export * from "./models/IDidService";
|
|
7
10
|
export * from "./models/IDidVerifiableCredential";
|
|
8
11
|
export * from "./models/IDidVerifiablePresentation";
|
|
9
|
-
export * from "./models/didVerificationMethodType";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contexts for DIDs.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DidContexts: {
|
|
5
|
+
/**
|
|
6
|
+
* The context root for DID VC v1.
|
|
7
|
+
*/
|
|
8
|
+
readonly ContextV1: "https://www.w3.org/2018/credentials/v1";
|
|
9
|
+
/**
|
|
10
|
+
* The context root for DID VC v2.
|
|
11
|
+
*/
|
|
12
|
+
readonly ContextV2: "https://www.w3.org/ns/credentials/v2";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The contexts for DIDs.
|
|
16
|
+
*/
|
|
17
|
+
export type DidContexts = (typeof DidContexts)[keyof typeof DidContexts];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types for DIDs.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DidTypes: {
|
|
5
|
+
/**
|
|
6
|
+
* The type for Verifiable Credential.
|
|
7
|
+
*/
|
|
8
|
+
readonly VerifiableCredential: "VerifiableCredential";
|
|
9
|
+
/**
|
|
10
|
+
* The type for Verifiable Presentation.
|
|
11
|
+
*/
|
|
12
|
+
readonly VerifiablePresentation: "VerifiablePresentation";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The types for DIDs.
|
|
16
|
+
*/
|
|
17
|
+
export type DidTypes = (typeof DidTypes)[keyof typeof DidTypes];
|
package/docs/changelog.md
CHANGED
package/docs/reference/index.md
CHANGED
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
## Type Aliases
|
|
15
15
|
|
|
16
|
+
- [DidContexts](type-aliases/DidContexts.md)
|
|
17
|
+
- [DidTypes](type-aliases/DidTypes.md)
|
|
16
18
|
- [DidVerificationMethodType](type-aliases/DidVerificationMethodType.md)
|
|
17
19
|
|
|
18
20
|
## Variables
|
|
19
21
|
|
|
22
|
+
- [DidContexts](variables/DidContexts.md)
|
|
23
|
+
- [DidTypes](variables/DidTypes.md)
|
|
20
24
|
- [DidVerificationMethodType](variables/DidVerificationMethodType.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: DidContexts
|
|
2
|
+
|
|
3
|
+
> `const` **DidContexts**: `object`
|
|
4
|
+
|
|
5
|
+
The contexts for DIDs.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### ContextV1
|
|
10
|
+
|
|
11
|
+
> `readonly` **ContextV1**: `"https://www.w3.org/2018/credentials/v1"` = `"https://www.w3.org/2018/credentials/v1"`
|
|
12
|
+
|
|
13
|
+
The context root for DID VC v1.
|
|
14
|
+
|
|
15
|
+
### ContextV2
|
|
16
|
+
|
|
17
|
+
> `readonly` **ContextV2**: `"https://www.w3.org/ns/credentials/v2"` = `"https://www.w3.org/ns/credentials/v2"`
|
|
18
|
+
|
|
19
|
+
The context root for DID VC v2.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: DidTypes
|
|
2
|
+
|
|
3
|
+
> `const` **DidTypes**: `object`
|
|
4
|
+
|
|
5
|
+
The types for DIDs.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### VerifiableCredential
|
|
10
|
+
|
|
11
|
+
> `readonly` **VerifiableCredential**: `"VerifiableCredential"` = `"VerifiableCredential"`
|
|
12
|
+
|
|
13
|
+
The type for Verifiable Credential.
|
|
14
|
+
|
|
15
|
+
### VerifiablePresentation
|
|
16
|
+
|
|
17
|
+
> `readonly` **VerifiablePresentation**: `"VerifiablePresentation"` = `"VerifiablePresentation"`
|
|
18
|
+
|
|
19
|
+
The type for Verifiable Presentation.
|