@sphereon/oid4vci-common 0.8.1 → 0.8.2-next.12
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/functions/CredentialOfferUtil.d.ts +3 -0
- package/dist/functions/CredentialOfferUtil.d.ts.map +1 -1
- package/dist/functions/CredentialOfferUtil.js +29 -1
- package/dist/functions/CredentialOfferUtil.js.map +1 -1
- package/dist/functions/CredentialRequestUtil.d.ts +3 -2
- package/dist/functions/CredentialRequestUtil.d.ts.map +1 -1
- package/dist/functions/CredentialRequestUtil.js +26 -2
- package/dist/functions/CredentialRequestUtil.js.map +1 -1
- package/dist/functions/FormatUtils.d.ts +15 -0
- package/dist/functions/FormatUtils.d.ts.map +1 -0
- package/dist/functions/FormatUtils.js +44 -0
- package/dist/functions/FormatUtils.js.map +1 -0
- package/dist/functions/IssuerMetadataUtils.d.ts +3 -0
- package/dist/functions/IssuerMetadataUtils.d.ts.map +1 -1
- package/dist/functions/IssuerMetadataUtils.js +21 -4
- package/dist/functions/IssuerMetadataUtils.js.map +1 -1
- package/dist/functions/index.d.ts +1 -0
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +1 -0
- package/dist/functions/index.js.map +1 -1
- package/dist/types/Authorization.types.d.ts +14 -5
- package/dist/types/Authorization.types.d.ts.map +1 -1
- package/dist/types/Authorization.types.js.map +1 -1
- package/dist/types/Generic.types.d.ts +47 -17
- package/dist/types/Generic.types.d.ts.map +1 -1
- package/dist/types/Generic.types.js.map +1 -1
- package/dist/types/QRCode.types.d.ts +205 -0
- package/dist/types/QRCode.types.d.ts.map +1 -0
- package/dist/types/QRCode.types.js +5 -0
- package/dist/types/QRCode.types.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/v1_0_08.types.d.ts +6 -2
- package/dist/types/v1_0_08.types.d.ts.map +1 -1
- package/dist/types/v1_0_11.types.d.ts +5 -15
- package/dist/types/v1_0_11.types.d.ts.map +1 -1
- package/dist/types/v1_0_11.types.js.map +1 -1
- package/lib/functions/CredentialOfferUtil.ts +27 -0
- package/lib/functions/CredentialRequestUtil.ts +31 -3
- package/lib/functions/FormatUtils.ts +52 -0
- package/lib/functions/IssuerMetadataUtils.ts +20 -3
- package/lib/functions/index.ts +1 -0
- package/lib/types/Authorization.types.ts +28 -5
- package/lib/types/Generic.types.ts +61 -15
- package/lib/types/QRCode.types.ts +227 -0
- package/lib/types/index.ts +1 -0
- package/lib/types/v1_0_08.types.ts +7 -2
- package/lib/types/v1_0_11.types.ts +8 -20
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ export interface ImageInfo {
|
|
|
15
15
|
[key: string]: unknown;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export type OID4VCICredentialFormat = 'jwt_vc_json' | 'jwt_vc_json-ld' | 'ldp_vc' /*| 'mso_mdoc'*/; // we do not support mdocs at this point
|
|
18
|
+
export type OID4VCICredentialFormat = 'jwt_vc_json' | 'jwt_vc_json-ld' | 'ldp_vc' | 'vc+sd-jwt' /*| 'mso_mdoc'*/; // we do not support mdocs at this point
|
|
19
19
|
|
|
20
20
|
export interface NameAndLocale {
|
|
21
21
|
name?: string; // REQUIRED. String value of a display name for the Credential.
|
|
@@ -62,8 +62,6 @@ export interface CredentialIssuerMetadata extends CredentialIssuerMetadataOpts,
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export interface CredentialSupportedBrief {
|
|
65
|
-
name?: string; // fixme: Probably should not be here, is part of the display object
|
|
66
|
-
types: string[]; // REQUIRED. JSON array designating the types a certain credential type supports
|
|
67
65
|
cryptographic_binding_methods_supported?: string[]; // OPTIONAL. Array of case sensitive strings that identify how the Credential is bound to the identifier of the End-User who possesses the Credential
|
|
68
66
|
cryptographic_suites_supported?: string[]; // OPTIONAL. Array of case sensitive strings that identify the cryptographic suites that are supported for the cryptographic_binding_methods_supported
|
|
69
67
|
}
|
|
@@ -75,25 +73,62 @@ export type CommonCredentialSupported = CredentialSupportedBrief & {
|
|
|
75
73
|
/**
|
|
76
74
|
* following properties are non-mso_mdoc specific and we might wanna rethink them when we're going to support mso_mdoc
|
|
77
75
|
*/
|
|
78
|
-
credentialSubject?: IssuerCredentialSubject; // OPTIONAL. A JSON object containing a list of key value pairs, where the key identifies the claim offered in the Credential. The value MAY be a dictionary, which allows to represent the full (potentially deeply nested) structure of the verifiable credential to be issued.
|
|
79
|
-
order?: string[]; //An array of claims.display.name values that lists them in the order they should be displayed by the Wallet.
|
|
80
76
|
};
|
|
81
77
|
|
|
82
78
|
export interface CredentialSupportedJwtVcJsonLdAndLdpVc extends CommonCredentialSupported {
|
|
79
|
+
types: string[]; // REQUIRED. JSON array designating the types a certain credential type supports
|
|
83
80
|
'@context': ICredentialContextType[]; // REQUIRED. JSON array as defined in [VC_DATA], Section 4.1.
|
|
81
|
+
credentialSubject?: IssuerCredentialSubject; // OPTIONAL. A JSON object containing a list of key value pairs, where the key identifies the claim offered in the Credential. The value MAY be a dictionary, which allows to represent the full (potentially deeply nested) structure of the verifiable credential to be issued.
|
|
82
|
+
order?: string[]; //An array of claims.display.name values that lists them in the order they should be displayed by the Wallet.
|
|
83
|
+
format: 'ldp_vc' | 'jwt_vc_json-ld';
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export interface CredentialSupportedJwtVcJson extends CommonCredentialSupported {
|
|
87
|
+
types: string[]; // REQUIRED. JSON array designating the types a certain credential type supports
|
|
88
|
+
credentialSubject?: IssuerCredentialSubject; // OPTIONAL. A JSON object containing a list of key value pairs, where the key identifies the claim offered in the Credential. The value MAY be a dictionary, which allows to represent the full (potentially deeply nested) structure of the verifiable credential to be issued.
|
|
89
|
+
order?: string[]; //An array of claims.display.name values that lists them in the order they should be displayed by the Wallet.
|
|
87
90
|
format: 'jwt_vc_json';
|
|
88
91
|
}
|
|
89
92
|
|
|
90
|
-
export
|
|
93
|
+
export interface SdJwtVcCredentialDefinition {
|
|
94
|
+
vct: string; // REQUIRED. JSON string designating the type of an SD-JWT vc
|
|
95
|
+
claims?: IssuerCredentialSubject;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CredentialSupportedSdJwtVc extends CommonCredentialSupported {
|
|
99
|
+
format: 'vc+sd-jwt';
|
|
100
|
+
|
|
101
|
+
// REQUIRED. JSON object containing the detailed description of the credential type
|
|
102
|
+
credential_definition: SdJwtVcCredentialDefinition;
|
|
103
|
+
order?: string[]; //An array of claims.display.name values that lists them in the order they should be displayed by the Wallet.
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type CredentialSupported = CommonCredentialSupported &
|
|
107
|
+
(CredentialSupportedJwtVcJson | CredentialSupportedJwtVcJsonLdAndLdpVc | CredentialSupportedSdJwtVc);
|
|
91
108
|
|
|
92
|
-
export interface
|
|
109
|
+
export interface CommonCredentialOfferFormat {
|
|
93
110
|
format: OID4VCICredentialFormat | string;
|
|
94
|
-
types: string[];
|
|
95
111
|
}
|
|
96
112
|
|
|
113
|
+
export interface CredentialOfferFormatJwtVcJsonLdAndLdpVc extends CommonCredentialOfferFormat {
|
|
114
|
+
format: 'ldp_vc' | 'jwt_vc_json-ld';
|
|
115
|
+
// REQUIRED. JSON object containing (and isolating) the detailed description of the credential type. This object MUST be processed using full JSON-LD processing.
|
|
116
|
+
credential_definition: JsonLdIssuerCredentialDefinition;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface CredentialOfferFormatJwtVcJson extends CommonCredentialOfferFormat {
|
|
120
|
+
format: 'jwt_vc_json';
|
|
121
|
+
types: string[]; // REQUIRED. JSON array as defined in Appendix E.1.1.2. This claim contains the type values the Wallet shall request in the subsequent Credential Request.
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface CredentialOfferFormatSdJwtVc extends CommonCredentialOfferFormat {
|
|
125
|
+
format: 'vc+sd-jwt';
|
|
126
|
+
credential_definition: SdJwtVcCredentialDefinition;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type CredentialOfferFormat = CommonCredentialOfferFormat &
|
|
130
|
+
(CredentialOfferFormatJwtVcJsonLdAndLdpVc | CredentialOfferFormatJwtVcJson | CredentialOfferFormatSdJwtVc);
|
|
131
|
+
|
|
97
132
|
/**
|
|
98
133
|
* Optional storage that can help the credential Data Supplier. For instance to store credential input data during offer creation, if no additional data can be supplied later on
|
|
99
134
|
*/
|
|
@@ -101,16 +136,17 @@ export type CredentialDataSupplierInput = any;
|
|
|
101
136
|
|
|
102
137
|
export type CreateCredentialOfferURIResult = {
|
|
103
138
|
uri: string;
|
|
139
|
+
qrCodeDataUri?: string;
|
|
104
140
|
session: CredentialOfferSession;
|
|
105
141
|
userPin?: string;
|
|
106
142
|
userPinLength?: number;
|
|
107
143
|
userPinRequired: boolean;
|
|
108
144
|
};
|
|
109
145
|
|
|
110
|
-
export interface
|
|
146
|
+
export interface JsonLdIssuerCredentialDefinition {
|
|
111
147
|
'@context': ICredentialContextType[];
|
|
112
148
|
types: string[];
|
|
113
|
-
credentialSubject
|
|
149
|
+
credentialSubject?: IssuerCredentialSubject;
|
|
114
150
|
}
|
|
115
151
|
|
|
116
152
|
export interface ErrorResponse extends Response {
|
|
@@ -127,15 +163,20 @@ export interface CommonCredentialRequest {
|
|
|
127
163
|
proof?: ProofOfPossession;
|
|
128
164
|
}
|
|
129
165
|
|
|
130
|
-
export interface
|
|
131
|
-
format: 'jwt_vc_json'
|
|
166
|
+
export interface CredentialRequestJwtVcJson extends CommonCredentialRequest {
|
|
167
|
+
format: 'jwt_vc_json';
|
|
132
168
|
types: string[];
|
|
133
169
|
credentialSubject?: IssuerCredentialSubject;
|
|
134
170
|
}
|
|
135
171
|
|
|
136
|
-
export interface
|
|
137
|
-
format: 'ldp_vc';
|
|
138
|
-
credential_definition:
|
|
172
|
+
export interface CredentialRequestJwtVcJsonLdAndLdpVc extends CommonCredentialRequest {
|
|
173
|
+
format: 'ldp_vc' | 'jwt_vc_json-ld';
|
|
174
|
+
credential_definition: JsonLdIssuerCredentialDefinition;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface CredentialRequestSdJwtVc extends CommonCredentialRequest {
|
|
178
|
+
format: 'vc+sd-jwt';
|
|
179
|
+
credential_definition: SdJwtVcCredentialDefinition;
|
|
139
180
|
}
|
|
140
181
|
|
|
141
182
|
export interface CommonCredentialResponse {
|
|
@@ -156,6 +197,11 @@ export interface CredentialResponseJwtVc {
|
|
|
156
197
|
credential: string;
|
|
157
198
|
}
|
|
158
199
|
|
|
200
|
+
export interface CredentialResponseSdJwtVc {
|
|
201
|
+
format: 'vc+sd-jwt';
|
|
202
|
+
credential: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
159
205
|
// export type CredentialSubjectDisplay = NameAndLocale[];
|
|
160
206
|
|
|
161
207
|
export type IssuerCredentialSubjectDisplay = CredentialSubjectDisplay & { [key: string]: CredentialSubjectDisplay };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
export interface ComponentOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Component options for data/ECC.
|
|
4
|
+
*/
|
|
5
|
+
data?: {
|
|
6
|
+
/**
|
|
7
|
+
* Scale factor for data/ECC dots.
|
|
8
|
+
* @default 1
|
|
9
|
+
*/
|
|
10
|
+
scale?: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Component options for timing patterns.
|
|
15
|
+
*/
|
|
16
|
+
timing?: {
|
|
17
|
+
/**
|
|
18
|
+
* Scale factor for timing patterns.
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
21
|
+
scale?: number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Protector for timing patterns.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
protectors?: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Component options for alignment patterns.
|
|
32
|
+
*/
|
|
33
|
+
alignment?: {
|
|
34
|
+
/**
|
|
35
|
+
* Scale factor for alignment patterns.
|
|
36
|
+
* @default 1
|
|
37
|
+
*/
|
|
38
|
+
scale?: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Protector for alignment patterns.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
protectors?: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Component options for alignment pattern on the bottom-right corner.
|
|
49
|
+
*/
|
|
50
|
+
cornerAlignment?: {
|
|
51
|
+
/**
|
|
52
|
+
* Scale factor for alignment pattern on the bottom-right corner.
|
|
53
|
+
* @default 1
|
|
54
|
+
*/
|
|
55
|
+
scale?: number;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Protector for alignment pattern on the bottom-right corner.
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
protectors?: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export interface QRCodeOpts {
|
|
66
|
+
/**
|
|
67
|
+
* Size of the QR code in pixel.
|
|
68
|
+
*
|
|
69
|
+
* @defaultValue 400
|
|
70
|
+
*/
|
|
71
|
+
size?: number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Size of margins around the QR code body in pixel.
|
|
75
|
+
*
|
|
76
|
+
* @defaultValue 20
|
|
77
|
+
*/
|
|
78
|
+
margin?: number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Error correction level of the QR code.
|
|
82
|
+
*
|
|
83
|
+
* Accepts a value provided by _QRErrorCorrectLevel_.
|
|
84
|
+
*
|
|
85
|
+
* For more information, please refer to [https://www.qrcode.com/en/about/error_correction.html](https://www.qrcode.com/en/about/error_correction.html).
|
|
86
|
+
*
|
|
87
|
+
* @defaultValue 0
|
|
88
|
+
*/
|
|
89
|
+
correctLevel?: number;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* **This is an advanced option.**
|
|
93
|
+
*
|
|
94
|
+
* Specify the mask pattern to be used in QR code encoding.
|
|
95
|
+
*
|
|
96
|
+
* Accepts a value provided by _QRMaskPattern_.
|
|
97
|
+
*
|
|
98
|
+
* To find out all eight mask patterns, please refer to [https://en.wikipedia.org/wiki/File:QR_Code_Mask_Patterns.svg](https://en.wikipedia.org/wiki/File:QR_Code_Mask_Patterns.svg)
|
|
99
|
+
*
|
|
100
|
+
* For more information, please refer to [https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Masking](https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Masking).
|
|
101
|
+
*/
|
|
102
|
+
maskPattern?: number;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* **This is an advanced option.**
|
|
106
|
+
*
|
|
107
|
+
* Specify the version to be used in QR code encoding.
|
|
108
|
+
*
|
|
109
|
+
* Accepts an integer in range [1, 40].
|
|
110
|
+
*
|
|
111
|
+
* For more information, please refer to [https://www.qrcode.com/en/about/version.html](https://www.qrcode.com/en/about/version.html).
|
|
112
|
+
*/
|
|
113
|
+
version?: number;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Options to control components in the QR code.
|
|
117
|
+
*
|
|
118
|
+
* @deafultValue undefined
|
|
119
|
+
*/
|
|
120
|
+
components?: ComponentOptions;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Color of the blocks on the QR code.
|
|
124
|
+
*
|
|
125
|
+
* Accepts a CSS <color>.
|
|
126
|
+
*
|
|
127
|
+
* For more information about CSS <color>, please refer to [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue "#000000"
|
|
130
|
+
*/
|
|
131
|
+
colorDark?: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Color of the empty areas on the QR code.
|
|
135
|
+
*
|
|
136
|
+
* Accepts a CSS <color>.
|
|
137
|
+
*
|
|
138
|
+
* For more information about CSS <color>, please refer to [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
|
|
139
|
+
*
|
|
140
|
+
* @defaultValue "#ffffff"
|
|
141
|
+
*/
|
|
142
|
+
colorLight?: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Automatically calculate the _colorLight_ value from the QR code's background.
|
|
146
|
+
*
|
|
147
|
+
* @defaultValue true
|
|
148
|
+
*/
|
|
149
|
+
autoColor?: boolean;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Background image to be used in the QR code.
|
|
153
|
+
*
|
|
154
|
+
* Accepts a `data:` string in web browsers or a Buffer in Node.js.
|
|
155
|
+
*
|
|
156
|
+
* @defaultValue undefined
|
|
157
|
+
*/
|
|
158
|
+
backgroundImage?: string | Buffer;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Color of the dimming mask above the background image.
|
|
162
|
+
*
|
|
163
|
+
* Accepts a CSS <color>.
|
|
164
|
+
*
|
|
165
|
+
* For more information about CSS <color>, please refer to [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
|
|
166
|
+
*
|
|
167
|
+
* @defaultValue "rgba(0, 0, 0, 0)"
|
|
168
|
+
*/
|
|
169
|
+
backgroundDimming?: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* GIF background image to be used in the QR code.
|
|
173
|
+
*
|
|
174
|
+
* @defaultValue undefined
|
|
175
|
+
*/
|
|
176
|
+
gifBackground?: ArrayBuffer;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Use a white margin instead of a transparent one which reveals the background of the QR code on margins.
|
|
180
|
+
*
|
|
181
|
+
* @defaultValue true
|
|
182
|
+
*/
|
|
183
|
+
whiteMargin?: boolean;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Logo image to be displayed at the center of the QR code.
|
|
187
|
+
*
|
|
188
|
+
* Accepts a `data:` string in web browsers or a Buffer in Node.js.
|
|
189
|
+
*
|
|
190
|
+
* When set to `undefined` or `null`, the logo is disabled.
|
|
191
|
+
*
|
|
192
|
+
* @defaultValue undefined
|
|
193
|
+
*/
|
|
194
|
+
logoImage?: string | Buffer;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Ratio of the logo size to the QR code size.
|
|
198
|
+
*
|
|
199
|
+
* @defaultValue 0.2
|
|
200
|
+
*/
|
|
201
|
+
logoScale?: number;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Size of margins around the logo image in pixels.
|
|
205
|
+
*
|
|
206
|
+
* @defaultValue 6
|
|
207
|
+
*/
|
|
208
|
+
logoMargin?: number;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Corner radius of the logo image in pixels.
|
|
212
|
+
*
|
|
213
|
+
* @defaultValue 8
|
|
214
|
+
*/
|
|
215
|
+
logoCornerRadius?: number;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @deprecated
|
|
219
|
+
*
|
|
220
|
+
* Ratio of the real size to the full size of the blocks.
|
|
221
|
+
*
|
|
222
|
+
* This can be helpful when you want to make more parts of the background visible.
|
|
223
|
+
*
|
|
224
|
+
* @deafultValue 0.4
|
|
225
|
+
*/
|
|
226
|
+
dotScale?: number;
|
|
227
|
+
};
|
package/lib/types/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { CredentialsSupportedDisplay, CredentialSupportedBrief, IssuerCredential
|
|
|
6
6
|
export interface CredentialRequestV1_0_08 {
|
|
7
7
|
type: string;
|
|
8
8
|
format: CredentialFormat;
|
|
9
|
-
proof
|
|
9
|
+
proof?: ProofOfPossession;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface IssuerMetadataV1_0_08 {
|
|
@@ -34,11 +34,16 @@ export interface CredentialSupportedTypeV1_0_08 {
|
|
|
34
34
|
[credentialType: string]: CredentialSupportedV1_0_08;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
export interface CredentialSupportedFormatV1_0_08 extends CredentialSupportedBrief {
|
|
38
|
+
name?: string;
|
|
39
|
+
types: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
export interface CredentialSupportedV1_0_08 {
|
|
38
43
|
display?: CredentialsSupportedDisplay[];
|
|
39
44
|
formats: {
|
|
40
45
|
// REQUIRED. A JSON object containing a list of key value pairs, where the key is a string identifying the format of the Credential. Below is a non-exhaustive list of valid key values defined by this specification:
|
|
41
|
-
[credentialFormat: string]:
|
|
46
|
+
[credentialFormat: string]: CredentialSupportedFormatV1_0_08;
|
|
42
47
|
};
|
|
43
48
|
claims?: IssuerCredentialSubject; // REQUIRED. A JSON object containing a list of key value pairs, where the key identifies the claim offered in the Credential. The value is a JSON object detailing the specifics about the support for the claim with a following non-exhaustive list of parameters that MAY be included:
|
|
44
49
|
}
|
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
CommonCredentialRequest,
|
|
4
4
|
CredentialDataSupplierInput,
|
|
5
5
|
CredentialOfferFormat,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
CredentialRequestJwtVcJson,
|
|
7
|
+
CredentialRequestJwtVcJsonLdAndLdpVc,
|
|
8
|
+
CredentialRequestSdJwtVc,
|
|
8
9
|
Grant,
|
|
9
|
-
IssuerCredentialDefinition,
|
|
10
10
|
} from './Generic.types';
|
|
11
|
+
import { QRCodeOpts } from './QRCode.types';
|
|
11
12
|
|
|
12
13
|
export interface CredentialOfferV1_0_11 {
|
|
13
14
|
credential_offer?: CredentialOfferPayloadV1_0_11;
|
|
@@ -18,10 +19,11 @@ export interface CredentialOfferRESTRequest extends CredentialOfferV1_0_11 {
|
|
|
18
19
|
baseUri?: string;
|
|
19
20
|
scheme?: string;
|
|
20
21
|
pinLength?: number;
|
|
22
|
+
qrCodeOpts?: QRCodeOpts;
|
|
21
23
|
credentialDataSupplierInput?: CredentialDataSupplierInput;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
export interface
|
|
26
|
+
export interface CredentialOfferPayloadV1_0_11 {
|
|
25
27
|
/**
|
|
26
28
|
* REQUIRED. The URL of the Credential Issuer, the Wallet is requested to obtain one or more Credentials from.
|
|
27
29
|
*/
|
|
@@ -48,22 +50,8 @@ export interface CommonCredentialOfferPayloadV1_0_11 {
|
|
|
48
50
|
grants?: Grant;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
* REQUIRED. JSON object containing (and isolating) the detailed description of the credential type.
|
|
54
|
-
* This object MUST be processed using full JSON-LD processing. It consists of the following sub-claims:
|
|
55
|
-
* - @context: REQUIRED. JSON array as defined in Appendix E.1.3.2
|
|
56
|
-
* - types: REQUIRED. JSON array as defined in Appendix E.1.3.2.
|
|
57
|
-
* This claim contains the type values the Wallet shall request in the subsequent Credential Request
|
|
58
|
-
*/
|
|
59
|
-
credential_definition: IssuerCredentialDefinition;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type CredentialOfferJwtVcV1_0_11 = CommonCredentialOfferPayloadV1_0_11;
|
|
63
|
-
|
|
64
|
-
export type CredentialOfferPayloadV1_0_11 = CommonCredentialOfferPayloadV1_0_11 & (CredentialOfferLdpVcV1_0_11 | CredentialOfferJwtVcV1_0_11);
|
|
65
|
-
|
|
66
|
-
export type CredentialRequestV1_0_11 = CommonCredentialRequest & (CredentialRequestJwtVc | CredentialRequestLdpVc);
|
|
53
|
+
export type CredentialRequestV1_0_11 = CommonCredentialRequest &
|
|
54
|
+
(CredentialRequestJwtVcJson | CredentialRequestJwtVcJsonLdAndLdpVc | CredentialRequestSdJwtVc);
|
|
67
55
|
|
|
68
56
|
export interface AuthorizationRequestV1_0_11 extends AuthorizationDetailsJwtVcJson, AuthorizationDetailsJwtVcJson {
|
|
69
57
|
issuer_state?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/oid4vci-common",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-next.12+1595df2",
|
|
4
4
|
"description": "OpenID 4 Verifiable Credential Issuance Common Types",
|
|
5
5
|
"source": "lib/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "1595df295c655d32eadf785d11c79fc69dffa8d6"
|
|
50
50
|
}
|