@sphereon/ssi-types 0.8.1-unstable.85 → 0.8.1-unstable.86
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/vc.d.ts +8 -29
- package/dist/types/vc.d.ts.map +1 -1
- package/dist/types/vc.js.map +1 -1
- package/package.json +2 -2
- package/src/types/vc.ts +9 -37
package/dist/types/vc.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { PresentationSubmission } from './pex';
|
|
|
2
2
|
import { IProofPurpose, IProofType } from './did';
|
|
3
3
|
export declare type AdditionalClaims = Record<string, any>;
|
|
4
4
|
export declare type IIssuerId = string;
|
|
5
|
-
export interface
|
|
5
|
+
export interface ICredentialWithoutType {
|
|
6
6
|
'@context': ICredentialContextType | ICredentialContextType[];
|
|
7
|
-
type: string[];
|
|
8
7
|
credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[];
|
|
9
8
|
issuer: IIssuerId | IIssuer;
|
|
10
9
|
issuanceDate: string;
|
|
@@ -17,22 +16,13 @@ export interface ICredentialWithType {
|
|
|
17
16
|
name?: string;
|
|
18
17
|
[x: string]: any;
|
|
19
18
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
19
|
+
export interface VerifiableDataTypeProperty {
|
|
20
|
+
type: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface VerifiableDataAtTypeProperty {
|
|
22
23
|
'@type': string[];
|
|
23
|
-
credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[];
|
|
24
|
-
issuer: IIssuerId | IIssuer;
|
|
25
|
-
issuanceDate: string;
|
|
26
|
-
credentialSubject: (ICredentialSubject & AdditionalClaims) | (ICredentialSubject & AdditionalClaims)[];
|
|
27
|
-
expirationDate?: string;
|
|
28
|
-
id?: string;
|
|
29
|
-
'@id'?: string;
|
|
30
|
-
credentialStatus?: ICredentialStatus;
|
|
31
|
-
description?: string;
|
|
32
|
-
name?: string;
|
|
33
|
-
[x: string]: any;
|
|
34
24
|
}
|
|
35
|
-
export declare type ICredential =
|
|
25
|
+
export declare type ICredential = ICredentialWithoutType & (VerifiableDataAtTypeProperty | VerifiableDataTypeProperty);
|
|
36
26
|
export interface ICredentialSubject {
|
|
37
27
|
id?: string;
|
|
38
28
|
}
|
|
@@ -81,27 +71,16 @@ export declare type CompactJWT = string;
|
|
|
81
71
|
* See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats}
|
|
82
72
|
*/
|
|
83
73
|
export declare type W3CVerifiableCredential = IVerifiableCredential | CompactJWT;
|
|
84
|
-
export interface
|
|
85
|
-
id?: string;
|
|
86
|
-
'@id'?: string;
|
|
87
|
-
'@context': ICredentialContextType | ICredentialContextType[];
|
|
88
|
-
type: string[];
|
|
89
|
-
verifiableCredential: W3CVerifiableCredential[];
|
|
90
|
-
presentation_submission?: PresentationSubmission;
|
|
91
|
-
holder?: string;
|
|
92
|
-
[x: string]: any;
|
|
93
|
-
}
|
|
94
|
-
export interface IPresentationWithAtType {
|
|
74
|
+
export interface IPresentationWithoutType {
|
|
95
75
|
id?: string;
|
|
96
76
|
'@id'?: string;
|
|
97
77
|
'@context': ICredentialContextType | ICredentialContextType[];
|
|
98
|
-
'@type': string[];
|
|
99
78
|
verifiableCredential: W3CVerifiableCredential[];
|
|
100
79
|
presentation_submission?: PresentationSubmission;
|
|
101
80
|
holder?: string;
|
|
102
81
|
[x: string]: any;
|
|
103
82
|
}
|
|
104
|
-
export declare type IPresentation =
|
|
83
|
+
export declare type IPresentation = IPresentationWithoutType & (VerifiableDataTypeProperty | VerifiableDataAtTypeProperty);
|
|
105
84
|
export declare type IVerifiablePresentation = IPresentation & IHasProof;
|
|
106
85
|
/**
|
|
107
86
|
* Represents a signed Verifiable Presentation (includes proof), in either JSON or compact JWT format.
|
package/dist/types/vc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc.d.ts","sourceRoot":"","sources":["../../src/types/vc.ts"],"names":[],"mappings":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A8B,GAAG,yBAAyB,GAAG,gCAAgC,CAAA;AACzG,oBAAY,QAAQ,GAAG,8BAA8B,GAAG,4BAA4B,CAAA"}
|
package/dist/types/vc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc.js","sourceRoot":"","sources":["../../src/types/vc.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"vc.js","sourceRoot":"","sources":["../../src/types/vc.ts"],"names":[],"mappings":";;;AA4KA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,kCAAkB,CAAA;IAClB,2CAA2B,CAAA;IAC3B,2CAA2B,CAAA;AAC7B,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-types",
|
|
3
3
|
"description": "SSI Common Types",
|
|
4
|
-
"version": "0.8.1-unstable.
|
|
4
|
+
"version": "0.8.1-unstable.86+55d3de7",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"Verifiable Credentials",
|
|
38
38
|
"DIDs"
|
|
39
39
|
],
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "55d3de7ef96fee215cc1eb1c497ffa3b125c218a"
|
|
41
41
|
}
|
package/src/types/vc.ts
CHANGED
|
@@ -5,9 +5,8 @@ export type AdditionalClaims = Record<string, any>
|
|
|
5
5
|
|
|
6
6
|
export type IIssuerId = string
|
|
7
7
|
|
|
8
|
-
export interface
|
|
8
|
+
export interface ICredentialWithoutType {
|
|
9
9
|
'@context': ICredentialContextType | ICredentialContextType[]
|
|
10
|
-
type: string[]
|
|
11
10
|
credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[]
|
|
12
11
|
// If iss is present, the value MUST be used to set the issuer property of the new credential JSON object or the holder property of the new presentation JSON object.
|
|
13
12
|
issuer: IIssuerId | IIssuer
|
|
@@ -27,29 +26,15 @@ export interface ICredentialWithType {
|
|
|
27
26
|
[x: string]: any
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
export interface
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[]
|
|
34
|
-
// If iss is present, the value MUST be used to set the issuer property of the new credential JSON object or the holder property of the new presentation JSON object.
|
|
35
|
-
issuer: IIssuerId | IIssuer
|
|
36
|
-
// If nbf is present, the UNIX timestamp MUST be converted to an [XMLSCHEMA11-2] date-time, and MUST be used to set the value of the issuanceDate property of the new JSON object.
|
|
37
|
-
issuanceDate: string
|
|
38
|
-
// If sub is present, the value MUST be used to set the value of the id property of credentialSubject of the new credential JSON object.
|
|
39
|
-
credentialSubject: (ICredentialSubject & AdditionalClaims) | (ICredentialSubject & AdditionalClaims)[]
|
|
40
|
-
// If exp is present, the UNIX timestamp MUST be converted to an [XMLSCHEMA11-2] date-time, and MUST be used to set the value of the expirationDate property of credentialSubject of the new JSON object.
|
|
41
|
-
expirationDate?: string
|
|
42
|
-
// If jti is present, the value MUST be used to set the value of the id property of the new JSON object.
|
|
43
|
-
id?: string
|
|
44
|
-
'@id'?: string
|
|
45
|
-
credentialStatus?: ICredentialStatus
|
|
46
|
-
description?: string
|
|
47
|
-
name?: string
|
|
29
|
+
export interface VerifiableDataTypeProperty {
|
|
30
|
+
type: string[]
|
|
31
|
+
}
|
|
48
32
|
|
|
49
|
-
|
|
33
|
+
export interface VerifiableDataAtTypeProperty {
|
|
34
|
+
'@type': string[]
|
|
50
35
|
}
|
|
51
36
|
|
|
52
|
-
export type ICredential =
|
|
37
|
+
export type ICredential = ICredentialWithoutType & (VerifiableDataAtTypeProperty | VerifiableDataTypeProperty)
|
|
53
38
|
|
|
54
39
|
export interface ICredentialSubject {
|
|
55
40
|
id?: string
|
|
@@ -113,23 +98,10 @@ export type CompactJWT = string
|
|
|
113
98
|
*/
|
|
114
99
|
export type W3CVerifiableCredential = IVerifiableCredential | CompactJWT
|
|
115
100
|
|
|
116
|
-
export interface
|
|
101
|
+
export interface IPresentationWithoutType {
|
|
117
102
|
id?: string
|
|
118
103
|
'@id'?: string
|
|
119
104
|
'@context': ICredentialContextType | ICredentialContextType[]
|
|
120
|
-
type: string[]
|
|
121
|
-
verifiableCredential: W3CVerifiableCredential[] // we relax to ICredential for internal decoded stable representations without proofs
|
|
122
|
-
presentation_submission?: PresentationSubmission
|
|
123
|
-
holder?: string
|
|
124
|
-
|
|
125
|
-
[x: string]: any
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface IPresentationWithAtType {
|
|
129
|
-
id?: string
|
|
130
|
-
'@id'?: string
|
|
131
|
-
'@context': ICredentialContextType | ICredentialContextType[]
|
|
132
|
-
'@type': string[]
|
|
133
105
|
verifiableCredential: W3CVerifiableCredential[] // we relax to ICredential for internal decoded stable representations without proofs
|
|
134
106
|
presentation_submission?: PresentationSubmission
|
|
135
107
|
holder?: string
|
|
@@ -137,7 +109,7 @@ export interface IPresentationWithAtType {
|
|
|
137
109
|
[x: string]: any
|
|
138
110
|
}
|
|
139
111
|
|
|
140
|
-
export type IPresentation =
|
|
112
|
+
export type IPresentation = IPresentationWithoutType & (VerifiableDataTypeProperty | VerifiableDataAtTypeProperty)
|
|
141
113
|
|
|
142
114
|
export type IVerifiablePresentation = IPresentation & IHasProof
|
|
143
115
|
|