@twin.org/standards-w3c-did 0.0.2-next.4 → 0.0.2-next.5
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/types/index.d.ts +3 -0
- package/dist/types/models/IDidVerifiablePresentation.d.ts +3 -31
- package/dist/types/models/IDidVerifiablePresentationCommon.d.ts +23 -0
- package/dist/types/models/IDidVerifiablePresentationV1.d.ts +17 -0
- package/dist/types/models/IDidVerifiablePresentationV2.d.ts +17 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/index.md +4 -1
- package/docs/reference/interfaces/{IDidVerifiablePresentation.md → IDidVerifiablePresentationCommon.md} +5 -16
- package/docs/reference/interfaces/IDidVerifiablePresentationV1.md +72 -0
- package/docs/reference/interfaces/IDidVerifiablePresentationV2.md +72 -0
- package/docs/reference/type-aliases/IDidVerifiablePresentation.md +5 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export * from "./models/IDidVerifiableCredentialCommon";
|
|
|
15
15
|
export * from "./models/IDidVerifiableCredentialV1";
|
|
16
16
|
export * from "./models/IDidVerifiableCredentialV2";
|
|
17
17
|
export * from "./models/IDidVerifiablePresentation";
|
|
18
|
+
export * from "./models/IDidVerifiablePresentationCommon";
|
|
19
|
+
export * from "./models/IDidVerifiablePresentationV1";
|
|
20
|
+
export * from "./models/IDidVerifiablePresentationV2";
|
|
18
21
|
export * from "./models/IJsonWebSignature2020Proof";
|
|
19
22
|
export * from "./models/IMultikey";
|
|
20
23
|
export * from "./models/IProof";
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { IDidVerifiableCredential } from "./IDidVerifiableCredential";
|
|
4
|
-
import type { IProof } from "./IProof";
|
|
1
|
+
import type { IDidVerifiablePresentationV1 } from "./IDidVerifiablePresentationV1";
|
|
2
|
+
import type { IDidVerifiablePresentationV2 } from "./IDidVerifiablePresentationV2";
|
|
5
3
|
/**
|
|
6
4
|
* Interface describing a verifiable presentation.
|
|
7
5
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
* The context for the verifiable presentation.
|
|
11
|
-
*/
|
|
12
|
-
"@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...IJsonLdContextDefinitionElement[]];
|
|
13
|
-
/**
|
|
14
|
-
* Provide a unique identifier for the presentation.
|
|
15
|
-
*/
|
|
16
|
-
id?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The types of the data stored in the verifiable credential.
|
|
19
|
-
*/
|
|
20
|
-
type: string | string[];
|
|
21
|
-
/**
|
|
22
|
-
* The data for the verifiable credentials.
|
|
23
|
-
*/
|
|
24
|
-
verifiableCredential?: (string | IDidVerifiableCredential)[];
|
|
25
|
-
/**
|
|
26
|
-
* The entity generating the presentation.
|
|
27
|
-
*/
|
|
28
|
-
holder?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Proofs that the verifiable presentation is valid.
|
|
31
|
-
* Optional if a different proof method is used, such as JWT.
|
|
32
|
-
*/
|
|
33
|
-
proof?: IProof | IProof[];
|
|
34
|
-
}
|
|
6
|
+
export type IDidVerifiablePresentation = IDidVerifiablePresentationV1 | IDidVerifiablePresentationV2;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IProof } from "./IProof";
|
|
2
|
+
/**
|
|
3
|
+
* Interface describing a verifiable presentation.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDidVerifiablePresentationCommon {
|
|
6
|
+
/**
|
|
7
|
+
* Provide a unique identifier for the presentation.
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The types of the data stored in the verifiable credential.
|
|
12
|
+
*/
|
|
13
|
+
type: string | string[];
|
|
14
|
+
/**
|
|
15
|
+
* The entity generating the presentation.
|
|
16
|
+
*/
|
|
17
|
+
holder?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Proofs that the verifiable presentation is valid.
|
|
20
|
+
* Optional if a different proof method is used, such as JWT.
|
|
21
|
+
*/
|
|
22
|
+
proof?: IProof | IProof[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { DidContexts } from "./didContexts";
|
|
3
|
+
import type { IDidVerifiableCredentialV1 } from "./IDidVerifiableCredentialV1";
|
|
4
|
+
import type { IDidVerifiablePresentationCommon } from "./IDidVerifiablePresentationCommon";
|
|
5
|
+
/**
|
|
6
|
+
* Interface describing a verifiable presentation.
|
|
7
|
+
*/
|
|
8
|
+
export interface IDidVerifiablePresentationV1 extends IDidVerifiablePresentationCommon {
|
|
9
|
+
/**
|
|
10
|
+
* The context for the verifiable presentation.
|
|
11
|
+
*/
|
|
12
|
+
"@context": typeof DidContexts.ContextVCv1 | [typeof DidContexts.ContextVCv1, ...IJsonLdContextDefinitionElement[]];
|
|
13
|
+
/**
|
|
14
|
+
* The data for the verifiable credentials.
|
|
15
|
+
*/
|
|
16
|
+
verifiableCredential?: (string | IDidVerifiableCredentialV1)[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { DidContexts } from "./didContexts";
|
|
3
|
+
import type { IDidVerifiableCredentialV2 } from "./IDidVerifiableCredentialV2";
|
|
4
|
+
import type { IDidVerifiablePresentationCommon } from "./IDidVerifiablePresentationCommon";
|
|
5
|
+
/**
|
|
6
|
+
* Interface describing a verifiable presentation.
|
|
7
|
+
*/
|
|
8
|
+
export interface IDidVerifiablePresentationV2 extends IDidVerifiablePresentationCommon {
|
|
9
|
+
/**
|
|
10
|
+
* The context for the verifiable presentation.
|
|
11
|
+
*/
|
|
12
|
+
"@context": typeof DidContexts.ContextVCv2 | [typeof DidContexts.ContextVCv2, ...IJsonLdContextDefinitionElement[]];
|
|
13
|
+
/**
|
|
14
|
+
* The data for the verifiable credentials.
|
|
15
|
+
*/
|
|
16
|
+
verifiableCredential?: (string | IDidVerifiableCredentialV2)[];
|
|
17
|
+
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/standards-w3c-did - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.5](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.4...standards-w3c-did-v0.0.2-next.5) (2025-09-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* separate DID VP v1 and v2 properties ([335a3c2](https://github.com/twinfoundation/standards/commit/335a3c2543ca5dbaae785568617ea85c0a8269ad))
|
|
9
|
+
|
|
3
10
|
## [0.0.2-next.4](https://github.com/twinfoundation/standards/compare/standards-w3c-did-v0.0.2-next.3...standards-w3c-did-v0.0.2-next.4) (2025-09-12)
|
|
4
11
|
|
|
5
12
|
|
package/docs/reference/index.md
CHANGED
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
- [IDidVerifiableCredentialCommon](interfaces/IDidVerifiableCredentialCommon.md)
|
|
22
22
|
- [IDidVerifiableCredentialV1](interfaces/IDidVerifiableCredentialV1.md)
|
|
23
23
|
- [IDidVerifiableCredentialV2](interfaces/IDidVerifiableCredentialV2.md)
|
|
24
|
-
- [
|
|
24
|
+
- [IDidVerifiablePresentationCommon](interfaces/IDidVerifiablePresentationCommon.md)
|
|
25
|
+
- [IDidVerifiablePresentationV1](interfaces/IDidVerifiablePresentationV1.md)
|
|
26
|
+
- [IDidVerifiablePresentationV2](interfaces/IDidVerifiablePresentationV2.md)
|
|
25
27
|
- [IJsonWebSignature2020Proof](interfaces/IJsonWebSignature2020Proof.md)
|
|
26
28
|
- [IMultikey](interfaces/IMultikey.md)
|
|
27
29
|
- [IProofSignerVerifier](interfaces/IProofSignerVerifier.md)
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
## Type Aliases
|
|
30
32
|
|
|
31
33
|
- [IDidVerifiableCredential](type-aliases/IDidVerifiableCredential.md)
|
|
34
|
+
- [IDidVerifiablePresentation](type-aliases/IDidVerifiablePresentation.md)
|
|
32
35
|
- [IProof](type-aliases/IProof.md)
|
|
33
36
|
- [DidContexts](type-aliases/DidContexts.md)
|
|
34
37
|
- [DidCryptoSuites](type-aliases/DidCryptoSuites.md)
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
# Interface:
|
|
1
|
+
# Interface: IDidVerifiablePresentationCommon
|
|
2
2
|
|
|
3
3
|
Interface describing a verifiable presentation.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
### @context
|
|
8
|
-
|
|
9
|
-
> **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
5
|
+
## Extended by
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
- [`IDidVerifiablePresentationV1`](IDidVerifiablePresentationV1.md)
|
|
8
|
+
- [`IDidVerifiablePresentationV2`](IDidVerifiablePresentationV2.md)
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
## Properties
|
|
14
11
|
|
|
15
12
|
### id?
|
|
16
13
|
|
|
@@ -28,14 +25,6 @@ The types of the data stored in the verifiable credential.
|
|
|
28
25
|
|
|
29
26
|
***
|
|
30
27
|
|
|
31
|
-
### verifiableCredential?
|
|
32
|
-
|
|
33
|
-
> `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredential`](../type-aliases/IDidVerifiableCredential.md))[]
|
|
34
|
-
|
|
35
|
-
The data for the verifiable credentials.
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
28
|
### holder?
|
|
40
29
|
|
|
41
30
|
> `optional` **holder**: `string`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Interface: IDidVerifiablePresentationV1
|
|
2
|
+
|
|
3
|
+
Interface describing a verifiable presentation.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md)
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### id?
|
|
12
|
+
|
|
13
|
+
> `optional` **id**: `string`
|
|
14
|
+
|
|
15
|
+
Provide a unique identifier for the presentation.
|
|
16
|
+
|
|
17
|
+
#### Inherited from
|
|
18
|
+
|
|
19
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`id`](IDidVerifiablePresentationCommon.md#id)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### type
|
|
24
|
+
|
|
25
|
+
> **type**: `string` \| `string`[]
|
|
26
|
+
|
|
27
|
+
The types of the data stored in the verifiable credential.
|
|
28
|
+
|
|
29
|
+
#### Inherited from
|
|
30
|
+
|
|
31
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`type`](IDidVerifiablePresentationCommon.md#type)
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### holder?
|
|
36
|
+
|
|
37
|
+
> `optional` **holder**: `string`
|
|
38
|
+
|
|
39
|
+
The entity generating the presentation.
|
|
40
|
+
|
|
41
|
+
#### Inherited from
|
|
42
|
+
|
|
43
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`holder`](IDidVerifiablePresentationCommon.md#holder)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### proof?
|
|
48
|
+
|
|
49
|
+
> `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
|
|
50
|
+
|
|
51
|
+
Proofs that the verifiable presentation is valid.
|
|
52
|
+
Optional if a different proof method is used, such as JWT.
|
|
53
|
+
|
|
54
|
+
#### Inherited from
|
|
55
|
+
|
|
56
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`proof`](IDidVerifiablePresentationCommon.md#proof)
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### @context
|
|
61
|
+
|
|
62
|
+
> **@context**: `"https://www.w3.org/2018/credentials/v1"` \| \[`"https://www.w3.org/2018/credentials/v1"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
63
|
+
|
|
64
|
+
The context for the verifiable presentation.
|
|
65
|
+
|
|
66
|
+
***
|
|
67
|
+
|
|
68
|
+
### verifiableCredential?
|
|
69
|
+
|
|
70
|
+
> `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredentialV1`](IDidVerifiableCredentialV1.md))[]
|
|
71
|
+
|
|
72
|
+
The data for the verifiable credentials.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Interface: IDidVerifiablePresentationV2
|
|
2
|
+
|
|
3
|
+
Interface describing a verifiable presentation.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- [`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md)
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### id?
|
|
12
|
+
|
|
13
|
+
> `optional` **id**: `string`
|
|
14
|
+
|
|
15
|
+
Provide a unique identifier for the presentation.
|
|
16
|
+
|
|
17
|
+
#### Inherited from
|
|
18
|
+
|
|
19
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`id`](IDidVerifiablePresentationCommon.md#id)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### type
|
|
24
|
+
|
|
25
|
+
> **type**: `string` \| `string`[]
|
|
26
|
+
|
|
27
|
+
The types of the data stored in the verifiable credential.
|
|
28
|
+
|
|
29
|
+
#### Inherited from
|
|
30
|
+
|
|
31
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`type`](IDidVerifiablePresentationCommon.md#type)
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### holder?
|
|
36
|
+
|
|
37
|
+
> `optional` **holder**: `string`
|
|
38
|
+
|
|
39
|
+
The entity generating the presentation.
|
|
40
|
+
|
|
41
|
+
#### Inherited from
|
|
42
|
+
|
|
43
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`holder`](IDidVerifiablePresentationCommon.md#holder)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### proof?
|
|
48
|
+
|
|
49
|
+
> `optional` **proof**: [`IProof`](../type-aliases/IProof.md) \| [`IProof`](../type-aliases/IProof.md)[]
|
|
50
|
+
|
|
51
|
+
Proofs that the verifiable presentation is valid.
|
|
52
|
+
Optional if a different proof method is used, such as JWT.
|
|
53
|
+
|
|
54
|
+
#### Inherited from
|
|
55
|
+
|
|
56
|
+
[`IDidVerifiablePresentationCommon`](IDidVerifiablePresentationCommon.md).[`proof`](IDidVerifiablePresentationCommon.md#proof)
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### @context
|
|
61
|
+
|
|
62
|
+
> **@context**: `"https://www.w3.org/ns/credentials/v2"` \| \[`"https://www.w3.org/ns/credentials/v2"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
63
|
+
|
|
64
|
+
The context for the verifiable presentation.
|
|
65
|
+
|
|
66
|
+
***
|
|
67
|
+
|
|
68
|
+
### verifiableCredential?
|
|
69
|
+
|
|
70
|
+
> `optional` **verifiableCredential**: (`string` \| [`IDidVerifiableCredentialV2`](IDidVerifiableCredentialV2.md))[]
|
|
71
|
+
|
|
72
|
+
The data for the verifiable credentials.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: IDidVerifiablePresentation
|
|
2
|
+
|
|
3
|
+
> **IDidVerifiablePresentation** = [`IDidVerifiablePresentationV1`](../interfaces/IDidVerifiablePresentationV1.md) \| [`IDidVerifiablePresentationV2`](../interfaces/IDidVerifiablePresentationV2.md)
|
|
4
|
+
|
|
5
|
+
Interface describing a verifiable presentation.
|