@animo-id/eudi-wallet-functionality 0.0.0-alpha-20260112191822 → 0.0.0-alpha-20260118230323
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/index.d.mts +339 -161
- package/dist/index.mjs +228 -77
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -10,10 +10,78 @@ declare class Ts12IntegrityError extends EudiWalletExtensionsError {
|
|
|
10
10
|
constructor(uri: string, integrity: string);
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
+
//#region src/merge-json.d.ts
|
|
14
|
+
type MergeStrategy = 'replace' | 'merge' | 'append';
|
|
15
|
+
interface GlobalMergeConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Default strategy for objects.
|
|
18
|
+
* - 'merge': Recursively merge properties (default).
|
|
19
|
+
* - 'replace': Replace the target object with the source object.
|
|
20
|
+
*/
|
|
21
|
+
objectStrategy?: 'merge' | 'replace';
|
|
22
|
+
/**
|
|
23
|
+
* Default strategy for arrays.
|
|
24
|
+
* - 'replace': Replace the target array with the source array (default).
|
|
25
|
+
* - 'append': Append source elements to the target array.
|
|
26
|
+
* - 'merge': Merge elements based on index or discriminant.
|
|
27
|
+
*/
|
|
28
|
+
arrayStrategy?: 'replace' | 'append' | 'merge';
|
|
29
|
+
/**
|
|
30
|
+
* Global validator called for every field merge.
|
|
31
|
+
* Defaults to `defaultValidator` which enforces strict type checking and prevents setting non-nullable values to null.
|
|
32
|
+
*/
|
|
33
|
+
validator?: GlobalValidator;
|
|
34
|
+
}
|
|
35
|
+
interface MergeConfig extends GlobalMergeConfig {
|
|
36
|
+
/**
|
|
37
|
+
* Strategy for this specific field.
|
|
38
|
+
*/
|
|
39
|
+
strategy?: MergeStrategy;
|
|
40
|
+
/**
|
|
41
|
+
* If the field is an array and strategy is 'merge', this defines how to match elements.
|
|
42
|
+
* - If string: The property name to use as a key (e.g., 'id').
|
|
43
|
+
* - If array of strings: Composite key (e.g., ['type', 'subtype']).
|
|
44
|
+
* - If undefined: Merge by index.
|
|
45
|
+
*/
|
|
46
|
+
arrayDiscriminant?: string | string[];
|
|
47
|
+
/**
|
|
48
|
+
* Validator to check if the transition from target to source is allowed.
|
|
49
|
+
* If the transition is invalid, this function should throw an error.
|
|
50
|
+
* @param target The current value in the target.
|
|
51
|
+
* @param source The new value from the source.
|
|
52
|
+
*/
|
|
53
|
+
validate?: (target: unknown, source: unknown) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Nested configuration for properties of this field (if it is an object).
|
|
56
|
+
*/
|
|
57
|
+
fields?: Record<string, MergeConfig>;
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for items of this field (if it is an array).
|
|
60
|
+
*/
|
|
61
|
+
items?: MergeConfig;
|
|
62
|
+
}
|
|
63
|
+
type GlobalValidator = (path: string, target: unknown, source: unknown) => void;
|
|
64
|
+
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
|
65
|
+
type MergeResult<Target, Source, Config extends MergeConfig = Record<string, never>> = Source extends undefined ? Target : Target extends undefined ? Source : NonNullable<Source> extends readonly unknown[] ? NonNullable<Target> extends readonly unknown[] ? Config['arrayStrategy'] extends 'append' | 'merge' ? Array<(Source extends readonly (infer S)[] ? S : never) | (Target extends readonly (infer T)[] ? T : never)> : Source : Source : NonNullable<Source> extends object ? NonNullable<Target> extends readonly unknown[] ? Source : NonNullable<Target> extends object ? Config['objectStrategy'] extends 'replace' ? Source : Expand<{ [K in keyof NonNullable<Target> as K extends keyof NonNullable<Source> ? never : K]: NonNullable<Target>[K] } & { [K in keyof NonNullable<Source>]: K extends keyof NonNullable<Target> ? MergeResult<NonNullable<Target>[K], NonNullable<Source>[K], Config> : NonNullable<Source>[K] }> : Source : Source;
|
|
66
|
+
/**
|
|
67
|
+
* Default validator that enforces:
|
|
68
|
+
* 1. Non-null/undefined values cannot be set to null/undefined.
|
|
69
|
+
* 2. Non-null/undefined types must match (e.g. cannot change string to number, or object to array).
|
|
70
|
+
*/
|
|
71
|
+
declare const defaultValidator: GlobalValidator;
|
|
72
|
+
/**
|
|
73
|
+
* Merges two JSON values based on a configuration.
|
|
74
|
+
*
|
|
75
|
+
* @param target The original object (will not be mutated).
|
|
76
|
+
* @param source The object to merge into the target.
|
|
77
|
+
* @param config Configuration for the merge behavior.
|
|
78
|
+
* @returns The merged object.
|
|
79
|
+
*/
|
|
80
|
+
declare function mergeJson<Target, Source, Config extends MergeConfig = MergeConfig>(target: Target, source: Source, config?: Config): MergeResult<Target, Source, Config>;
|
|
81
|
+
//#endregion
|
|
13
82
|
//#region src/validation/z-sca-attestation-ext.d.ts
|
|
14
83
|
declare const zScaTransactionDataTypeClaims: z.ZodArray<z.ZodObject<{
|
|
15
84
|
path: z.ZodArray<z.ZodString>;
|
|
16
|
-
visualisation: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
17
85
|
display: z.ZodArray<z.ZodObject<{
|
|
18
86
|
name: z.ZodString;
|
|
19
87
|
locale: z.ZodOptional<z.ZodString>;
|
|
@@ -22,23 +90,23 @@ declare const zScaTransactionDataTypeClaims: z.ZodArray<z.ZodObject<{
|
|
|
22
90
|
}, z.core.$strip>>;
|
|
23
91
|
declare const zScaTransactionDataTypeUiLabels: z.ZodObject<{
|
|
24
92
|
affirmative_action_label: z.ZodArray<z.ZodObject<{
|
|
25
|
-
|
|
93
|
+
locale: z.ZodString;
|
|
26
94
|
value: z.ZodString;
|
|
27
95
|
}, z.core.$strip>>;
|
|
28
96
|
denial_action_label: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
-
|
|
97
|
+
locale: z.ZodString;
|
|
30
98
|
value: z.ZodString;
|
|
31
99
|
}, z.core.$strip>>>;
|
|
32
100
|
transaction_title: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
-
|
|
101
|
+
locale: z.ZodString;
|
|
34
102
|
value: z.ZodString;
|
|
35
103
|
}, z.core.$strip>>>;
|
|
36
104
|
security_hint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
-
|
|
105
|
+
locale: z.ZodString;
|
|
38
106
|
value: z.ZodString;
|
|
39
107
|
}, z.core.$strip>>>;
|
|
40
108
|
}, z.core.$catchall<z.ZodArray<z.ZodObject<{
|
|
41
|
-
|
|
109
|
+
locale: z.ZodString;
|
|
42
110
|
value: z.ZodString;
|
|
43
111
|
}, z.core.$strip>>>>;
|
|
44
112
|
/**
|
|
@@ -50,15 +118,13 @@ declare const zScaTransactionDataTypeUiLabels: z.ZodObject<{
|
|
|
50
118
|
*/
|
|
51
119
|
declare const zScaAttestationExt: z.ZodObject<{
|
|
52
120
|
category: z.ZodOptional<z.ZodString>;
|
|
53
|
-
transaction_data_types: z.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, z.core.$strip>]>, z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
121
|
+
transaction_data_types: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
122
|
+
type: z.ZodString;
|
|
123
|
+
'type#integrity': z.ZodOptional<z.ZodString>;
|
|
124
|
+
subtype: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>, z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
59
126
|
claims: z.ZodArray<z.ZodObject<{
|
|
60
127
|
path: z.ZodArray<z.ZodString>;
|
|
61
|
-
visualisation: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
62
128
|
display: z.ZodArray<z.ZodObject<{
|
|
63
129
|
name: z.ZodString;
|
|
64
130
|
locale: z.ZodOptional<z.ZodString>;
|
|
@@ -71,23 +137,23 @@ declare const zScaAttestationExt: z.ZodObject<{
|
|
|
71
137
|
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
72
138
|
ui_labels: z.ZodObject<{
|
|
73
139
|
affirmative_action_label: z.ZodArray<z.ZodObject<{
|
|
74
|
-
|
|
140
|
+
locale: z.ZodString;
|
|
75
141
|
value: z.ZodString;
|
|
76
142
|
}, z.core.$strip>>;
|
|
77
143
|
denial_action_label: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
-
|
|
144
|
+
locale: z.ZodString;
|
|
79
145
|
value: z.ZodString;
|
|
80
146
|
}, z.core.$strip>>>;
|
|
81
147
|
transaction_title: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
-
|
|
148
|
+
locale: z.ZodString;
|
|
83
149
|
value: z.ZodString;
|
|
84
150
|
}, z.core.$strip>>>;
|
|
85
151
|
security_hint: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
86
|
-
|
|
152
|
+
locale: z.ZodString;
|
|
87
153
|
value: z.ZodString;
|
|
88
154
|
}, z.core.$strip>>>;
|
|
89
155
|
}, z.core.$catchall<z.ZodArray<z.ZodObject<{
|
|
90
|
-
|
|
156
|
+
locale: z.ZodString;
|
|
91
157
|
value: z.ZodString;
|
|
92
158
|
}, z.core.$strip>>>>;
|
|
93
159
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -102,7 +168,6 @@ interface ResolvedTs12Metadata {
|
|
|
102
168
|
schema: string | object;
|
|
103
169
|
claims: Array<{
|
|
104
170
|
path: string[];
|
|
105
|
-
visualisation: 1 | 2 | 3 | 4;
|
|
106
171
|
display: Array<{
|
|
107
172
|
name: string;
|
|
108
173
|
locale?: string;
|
|
@@ -111,24 +176,94 @@ interface ResolvedTs12Metadata {
|
|
|
111
176
|
}>;
|
|
112
177
|
ui_labels: {
|
|
113
178
|
affirmative_action_label: Array<{
|
|
114
|
-
|
|
179
|
+
locale: string;
|
|
115
180
|
value: string;
|
|
116
181
|
}>;
|
|
117
182
|
denial_action_label?: Array<{
|
|
118
|
-
|
|
183
|
+
locale: string;
|
|
119
184
|
value: string;
|
|
120
185
|
}>;
|
|
121
186
|
transaction_title?: Array<{
|
|
122
|
-
|
|
187
|
+
locale: string;
|
|
123
188
|
value: string;
|
|
124
189
|
}>;
|
|
125
190
|
security_hint?: Array<{
|
|
126
|
-
|
|
191
|
+
locale: string;
|
|
127
192
|
value: string;
|
|
128
193
|
}>;
|
|
129
194
|
};
|
|
130
195
|
}
|
|
131
|
-
declare function resolveTs12TransactionDisplayMetadata(metadata: ZScaAttestationExt, type: string, validateIntegrity?: (buf: ArrayBuffer, integrity: string) => boolean): Promise<ResolvedTs12Metadata | undefined>;
|
|
196
|
+
declare function resolveTs12TransactionDisplayMetadata(metadata: ZScaAttestationExt, type: string, subtype?: string, validateIntegrity?: (buf: ArrayBuffer, integrity: string) => boolean): Promise<ResolvedTs12Metadata | undefined>;
|
|
197
|
+
declare const baseMergeConfig: {
|
|
198
|
+
readonly fields: {
|
|
199
|
+
readonly display: {
|
|
200
|
+
readonly strategy: "replace";
|
|
201
|
+
};
|
|
202
|
+
readonly claims: {
|
|
203
|
+
readonly strategy: "merge";
|
|
204
|
+
readonly arrayDiscriminant: "path";
|
|
205
|
+
readonly items: {
|
|
206
|
+
readonly fields: {
|
|
207
|
+
readonly sd: {
|
|
208
|
+
readonly validate: (target: unknown, source: unknown) => void;
|
|
209
|
+
};
|
|
210
|
+
readonly mandatory: {
|
|
211
|
+
readonly validate: (target: unknown, source: unknown) => void;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
declare const ts12MergeConfig: {
|
|
219
|
+
readonly fields: {
|
|
220
|
+
readonly display: {
|
|
221
|
+
readonly strategy: "replace";
|
|
222
|
+
};
|
|
223
|
+
readonly claims: {
|
|
224
|
+
readonly strategy: "merge";
|
|
225
|
+
readonly arrayDiscriminant: "path";
|
|
226
|
+
readonly items: {
|
|
227
|
+
readonly fields: {
|
|
228
|
+
readonly sd: {
|
|
229
|
+
readonly validate: (target: unknown, source: unknown) => void;
|
|
230
|
+
};
|
|
231
|
+
readonly mandatory: {
|
|
232
|
+
readonly validate: (target: unknown, source: unknown) => void;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
readonly transaction_data_types: {
|
|
238
|
+
readonly arrayStrategy: "append";
|
|
239
|
+
readonly strategy: "merge";
|
|
240
|
+
readonly arrayDiscriminant: ["type", "subtype"];
|
|
241
|
+
readonly items: {
|
|
242
|
+
readonly fields: {
|
|
243
|
+
readonly claims: {
|
|
244
|
+
readonly strategy: "merge";
|
|
245
|
+
readonly arrayDiscriminant: "path";
|
|
246
|
+
readonly items: {
|
|
247
|
+
readonly fields: {
|
|
248
|
+
readonly display: {
|
|
249
|
+
readonly strategy: "merge";
|
|
250
|
+
readonly arrayDiscriminant: "locale";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
readonly ui_labels: {
|
|
256
|
+
readonly strategy: "merge";
|
|
257
|
+
readonly items: {
|
|
258
|
+
readonly strategy: "merge";
|
|
259
|
+
readonly arrayDiscriminant: "locale";
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
};
|
|
132
267
|
//#endregion
|
|
133
268
|
//#region src/validation/z-transaction-data-funke.d.ts
|
|
134
269
|
/**
|
|
@@ -209,41 +344,11 @@ declare const zPaymentPayload: z.ZodObject<{
|
|
|
209
344
|
}, z.core.$strip>>;
|
|
210
345
|
}, z.core.$strip>;
|
|
211
346
|
/**
|
|
212
|
-
* **TS12
|
|
347
|
+
* **TS12 Generic Payload**
|
|
213
348
|
* * @see EUDI TS12 Section 4.3.2
|
|
214
349
|
*/
|
|
215
|
-
declare const
|
|
350
|
+
declare const zGenericPayload: z.ZodObject<{
|
|
216
351
|
transaction_id: z.ZodString;
|
|
217
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
218
|
-
service: z.ZodOptional<z.ZodString>;
|
|
219
|
-
action: z.ZodString;
|
|
220
|
-
}, z.core.$strip>;
|
|
221
|
-
/**
|
|
222
|
-
* **TS12 Account Access Payload**
|
|
223
|
-
* * @see EUDI TS12 Section 4.3.3
|
|
224
|
-
*/
|
|
225
|
-
declare const zAccountAccessPayload: z.ZodObject<{
|
|
226
|
-
transaction_id: z.ZodString;
|
|
227
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
228
|
-
aisp: z.ZodOptional<z.ZodObject<{
|
|
229
|
-
legal_name: z.ZodString;
|
|
230
|
-
brand_name: z.ZodString;
|
|
231
|
-
domain_name: z.ZodString;
|
|
232
|
-
}, z.core.$strip>>;
|
|
233
|
-
description: z.ZodOptional<z.ZodString>;
|
|
234
|
-
}, z.core.$strip>;
|
|
235
|
-
/**
|
|
236
|
-
* **TS12 E-Mandate Payload**
|
|
237
|
-
* * @see EUDI TS12 Section 4.3.4
|
|
238
|
-
*/
|
|
239
|
-
declare const zEMandatePayload: z.ZodObject<{
|
|
240
|
-
transaction_id: z.ZodString;
|
|
241
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
242
|
-
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
243
|
-
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
244
|
-
reference_number: z.ZodOptional<z.ZodString>;
|
|
245
|
-
creditor_id: z.ZodOptional<z.ZodString>;
|
|
246
|
-
purpose: z.ZodOptional<z.ZodString>;
|
|
247
352
|
payment_payload: z.ZodOptional<z.ZodObject<{
|
|
248
353
|
transaction_id: z.ZodString;
|
|
249
354
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -293,24 +398,17 @@ declare const zEMandatePayload: z.ZodObject<{
|
|
|
293
398
|
}, z.core.$strip>>;
|
|
294
399
|
}, z.core.$strip>>;
|
|
295
400
|
}, z.core.$strip>>;
|
|
296
|
-
}, z.core.$
|
|
297
|
-
type Ts12AccountAccessPayload = z.infer<typeof zAccountAccessPayload>;
|
|
298
|
-
type Ts12EMandatePayload = z.infer<typeof zEMandatePayload>;
|
|
299
|
-
type Ts12LoginPayload = z.infer<typeof zLoginPayload>;
|
|
401
|
+
}, z.core.$catchall<z.ZodNullable<z.ZodString>>>;
|
|
300
402
|
type Ts12PaymentPayload = z.infer<typeof zPaymentPayload>;
|
|
403
|
+
type Ts12GenericPayload = z.infer<typeof zGenericPayload>;
|
|
301
404
|
declare const URN_SCA_PAYMENT = "urn:eudi:sca:payment:1";
|
|
302
|
-
declare const
|
|
303
|
-
declare const
|
|
304
|
-
declare const URN_SCA_EMANDATE = "urn:eudi:sca:emandate:1";
|
|
305
|
-
/**
|
|
306
|
-
* **TS12 Transaction**
|
|
307
|
-
* @see TS12 Section 4.3
|
|
308
|
-
*/
|
|
309
|
-
declare const zTs12Transaction: z.ZodObject<{
|
|
310
|
-
type: z.ZodString;
|
|
405
|
+
declare const URN_SCA_GENERIC = "urn:eudi:sca:generic:1";
|
|
406
|
+
declare const zTs12PaymentTransaction: z.ZodObject<{
|
|
311
407
|
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
312
408
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
313
|
-
|
|
409
|
+
type: z.ZodLiteral<"urn:eudi:sca:payment:1">;
|
|
410
|
+
subtype: z.ZodUndefined;
|
|
411
|
+
payload: z.ZodObject<{
|
|
314
412
|
transaction_id: z.ZodString;
|
|
315
413
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
316
414
|
payee: z.ZodObject<{
|
|
@@ -358,28 +456,138 @@ declare const zTs12Transaction: z.ZodObject<{
|
|
|
358
456
|
apr: z.ZodOptional<z.ZodNumber>;
|
|
359
457
|
}, z.core.$strip>>;
|
|
360
458
|
}, z.core.$strip>>;
|
|
361
|
-
}, z.core.$strip
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
declare const zTs12GenericTransaction: z.ZodObject<{
|
|
462
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
463
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
464
|
+
type: z.ZodLiteral<"urn:eudi:sca:generic:1">;
|
|
465
|
+
subtype: z.ZodString;
|
|
466
|
+
payload: z.ZodObject<{
|
|
362
467
|
transaction_id: z.ZodString;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
468
|
+
payment_payload: z.ZodOptional<z.ZodObject<{
|
|
469
|
+
transaction_id: z.ZodString;
|
|
470
|
+
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
471
|
+
payee: z.ZodObject<{
|
|
472
|
+
name: z.ZodString;
|
|
473
|
+
id: z.ZodString;
|
|
474
|
+
logo: z.ZodOptional<z.ZodURL>;
|
|
475
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
currency: z.ZodString;
|
|
478
|
+
amount: z.ZodNumber;
|
|
479
|
+
amount_estimated: z.ZodOptional<z.ZodBoolean>;
|
|
480
|
+
amount_earmarked: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
+
sct_inst: z.ZodOptional<z.ZodBoolean>;
|
|
482
|
+
pisp: z.ZodOptional<z.ZodObject<{
|
|
483
|
+
legal_name: z.ZodString;
|
|
484
|
+
brand_name: z.ZodString;
|
|
485
|
+
domain_name: z.ZodString;
|
|
486
|
+
}, z.core.$strip>>;
|
|
487
|
+
execution_date: z.ZodOptional<z.ZodISODateTime>;
|
|
488
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
489
|
+
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
490
|
+
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
491
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
492
|
+
frequency: z.ZodEnum<{
|
|
493
|
+
INDA: "INDA";
|
|
494
|
+
DAIL: "DAIL";
|
|
495
|
+
WEEK: "WEEK";
|
|
496
|
+
TOWK: "TOWK";
|
|
497
|
+
TWMN: "TWMN";
|
|
498
|
+
MNTH: "MNTH";
|
|
499
|
+
TOMN: "TOMN";
|
|
500
|
+
QUTR: "QUTR";
|
|
501
|
+
FOMN: "FOMN";
|
|
502
|
+
SEMI: "SEMI";
|
|
503
|
+
YEAR: "YEAR";
|
|
504
|
+
TYEA: "TYEA";
|
|
505
|
+
}>;
|
|
506
|
+
mit_options: z.ZodOptional<z.ZodObject<{
|
|
507
|
+
amount_variable: z.ZodOptional<z.ZodBoolean>;
|
|
508
|
+
min_amount: z.ZodOptional<z.ZodNumber>;
|
|
509
|
+
max_amount: z.ZodOptional<z.ZodNumber>;
|
|
510
|
+
total_amount: z.ZodOptional<z.ZodNumber>;
|
|
511
|
+
initial_amount: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
initial_amount_number: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
apr: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
}, z.core.$strip>>;
|
|
515
|
+
}, z.core.$strip>>;
|
|
516
|
+
}, z.core.$strip>>;
|
|
517
|
+
}, z.core.$catchall<z.ZodNullable<z.ZodString>>>;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
declare const zTs12FallbackTransaction: z.ZodObject<{
|
|
520
|
+
type: z.ZodString;
|
|
521
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
522
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
523
|
+
subtype: z.ZodOptional<z.ZodString>;
|
|
524
|
+
payload: z.ZodUnknown;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
/**
|
|
527
|
+
* **TS12 Transaction**
|
|
528
|
+
* @see TS12 Section 4.3
|
|
529
|
+
*/
|
|
530
|
+
declare const zTs12Transaction: z.ZodUnion<readonly [z.ZodObject<{
|
|
531
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
532
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
533
|
+
type: z.ZodLiteral<"urn:eudi:sca:payment:1">;
|
|
534
|
+
subtype: z.ZodUndefined;
|
|
535
|
+
payload: z.ZodObject<{
|
|
367
536
|
transaction_id: z.ZodString;
|
|
368
537
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
369
|
-
|
|
538
|
+
payee: z.ZodObject<{
|
|
539
|
+
name: z.ZodString;
|
|
540
|
+
id: z.ZodString;
|
|
541
|
+
logo: z.ZodOptional<z.ZodURL>;
|
|
542
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
543
|
+
}, z.core.$strip>;
|
|
544
|
+
currency: z.ZodString;
|
|
545
|
+
amount: z.ZodNumber;
|
|
546
|
+
amount_estimated: z.ZodOptional<z.ZodBoolean>;
|
|
547
|
+
amount_earmarked: z.ZodOptional<z.ZodBoolean>;
|
|
548
|
+
sct_inst: z.ZodOptional<z.ZodBoolean>;
|
|
549
|
+
pisp: z.ZodOptional<z.ZodObject<{
|
|
370
550
|
legal_name: z.ZodString;
|
|
371
551
|
brand_name: z.ZodString;
|
|
372
552
|
domain_name: z.ZodString;
|
|
373
553
|
}, z.core.$strip>>;
|
|
374
|
-
|
|
375
|
-
|
|
554
|
+
execution_date: z.ZodOptional<z.ZodISODateTime>;
|
|
555
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
556
|
+
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
557
|
+
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
558
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
559
|
+
frequency: z.ZodEnum<{
|
|
560
|
+
INDA: "INDA";
|
|
561
|
+
DAIL: "DAIL";
|
|
562
|
+
WEEK: "WEEK";
|
|
563
|
+
TOWK: "TOWK";
|
|
564
|
+
TWMN: "TWMN";
|
|
565
|
+
MNTH: "MNTH";
|
|
566
|
+
TOMN: "TOMN";
|
|
567
|
+
QUTR: "QUTR";
|
|
568
|
+
FOMN: "FOMN";
|
|
569
|
+
SEMI: "SEMI";
|
|
570
|
+
YEAR: "YEAR";
|
|
571
|
+
TYEA: "TYEA";
|
|
572
|
+
}>;
|
|
573
|
+
mit_options: z.ZodOptional<z.ZodObject<{
|
|
574
|
+
amount_variable: z.ZodOptional<z.ZodBoolean>;
|
|
575
|
+
min_amount: z.ZodOptional<z.ZodNumber>;
|
|
576
|
+
max_amount: z.ZodOptional<z.ZodNumber>;
|
|
577
|
+
total_amount: z.ZodOptional<z.ZodNumber>;
|
|
578
|
+
initial_amount: z.ZodOptional<z.ZodNumber>;
|
|
579
|
+
initial_amount_number: z.ZodOptional<z.ZodNumber>;
|
|
580
|
+
apr: z.ZodOptional<z.ZodNumber>;
|
|
581
|
+
}, z.core.$strip>>;
|
|
582
|
+
}, z.core.$strip>>;
|
|
583
|
+
}, z.core.$strip>;
|
|
584
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
585
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
586
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
587
|
+
type: z.ZodLiteral<"urn:eudi:sca:generic:1">;
|
|
588
|
+
subtype: z.ZodString;
|
|
589
|
+
payload: z.ZodObject<{
|
|
376
590
|
transaction_id: z.ZodString;
|
|
377
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
378
|
-
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
379
|
-
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
380
|
-
reference_number: z.ZodOptional<z.ZodString>;
|
|
381
|
-
creditor_id: z.ZodOptional<z.ZodString>;
|
|
382
|
-
purpose: z.ZodOptional<z.ZodString>;
|
|
383
591
|
payment_payload: z.ZodOptional<z.ZodObject<{
|
|
384
592
|
transaction_id: z.ZodString;
|
|
385
593
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -429,16 +637,23 @@ declare const zTs12Transaction: z.ZodObject<{
|
|
|
429
637
|
}, z.core.$strip>>;
|
|
430
638
|
}, z.core.$strip>>;
|
|
431
639
|
}, z.core.$strip>>;
|
|
432
|
-
}, z.core.$
|
|
433
|
-
}, z.core.$strip
|
|
640
|
+
}, z.core.$catchall<z.ZodNullable<z.ZodString>>>;
|
|
641
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
642
|
+
type: z.ZodString;
|
|
643
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
644
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
645
|
+
subtype: z.ZodOptional<z.ZodString>;
|
|
646
|
+
payload: z.ZodUnknown;
|
|
647
|
+
}, z.core.$strip>]>;
|
|
434
648
|
type Ts12TransactionDataEntry = z.infer<typeof zTs12Transaction>;
|
|
435
649
|
//#endregion
|
|
436
650
|
//#region src/validation/z-transaction-data.d.ts
|
|
437
|
-
declare const zTransactionDataEntry: z.ZodUnion<[z.ZodObject<{
|
|
438
|
-
type: z.ZodString;
|
|
651
|
+
declare const zTransactionDataEntry: z.ZodUnion<[z.ZodUnion<readonly [z.ZodObject<{
|
|
439
652
|
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
440
653
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
441
|
-
|
|
654
|
+
type: z.ZodLiteral<"urn:eudi:sca:payment:1">;
|
|
655
|
+
subtype: z.ZodUndefined;
|
|
656
|
+
payload: z.ZodObject<{
|
|
442
657
|
transaction_id: z.ZodString;
|
|
443
658
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
444
659
|
payee: z.ZodObject<{
|
|
@@ -486,28 +701,14 @@ declare const zTransactionDataEntry: z.ZodUnion<[z.ZodObject<{
|
|
|
486
701
|
apr: z.ZodOptional<z.ZodNumber>;
|
|
487
702
|
}, z.core.$strip>>;
|
|
488
703
|
}, z.core.$strip>>;
|
|
489
|
-
}, z.core.$strip
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
497
|
-
aisp: z.ZodOptional<z.ZodObject<{
|
|
498
|
-
legal_name: z.ZodString;
|
|
499
|
-
brand_name: z.ZodString;
|
|
500
|
-
domain_name: z.ZodString;
|
|
501
|
-
}, z.core.$strip>>;
|
|
502
|
-
description: z.ZodOptional<z.ZodString>;
|
|
503
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
704
|
+
}, z.core.$strip>;
|
|
705
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
706
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
707
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
708
|
+
type: z.ZodLiteral<"urn:eudi:sca:generic:1">;
|
|
709
|
+
subtype: z.ZodString;
|
|
710
|
+
payload: z.ZodObject<{
|
|
504
711
|
transaction_id: z.ZodString;
|
|
505
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
506
|
-
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
507
|
-
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
508
|
-
reference_number: z.ZodOptional<z.ZodString>;
|
|
509
|
-
creditor_id: z.ZodOptional<z.ZodString>;
|
|
510
|
-
purpose: z.ZodOptional<z.ZodString>;
|
|
511
712
|
payment_payload: z.ZodOptional<z.ZodObject<{
|
|
512
713
|
transaction_id: z.ZodString;
|
|
513
714
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -557,8 +758,14 @@ declare const zTransactionDataEntry: z.ZodUnion<[z.ZodObject<{
|
|
|
557
758
|
}, z.core.$strip>>;
|
|
558
759
|
}, z.core.$strip>>;
|
|
559
760
|
}, z.core.$strip>>;
|
|
560
|
-
}, z.core.$
|
|
761
|
+
}, z.core.$catchall<z.ZodNullable<z.ZodString>>>;
|
|
561
762
|
}, z.core.$strip>, z.ZodObject<{
|
|
763
|
+
type: z.ZodString;
|
|
764
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
765
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
766
|
+
subtype: z.ZodOptional<z.ZodString>;
|
|
767
|
+
payload: z.ZodUnknown;
|
|
768
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
562
769
|
type: z.ZodString;
|
|
563
770
|
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
564
771
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
@@ -572,11 +779,12 @@ declare const zTransactionDataEntry: z.ZodUnion<[z.ZodObject<{
|
|
|
572
779
|
hashAlgorithmOID: z.ZodOptional<z.ZodString>;
|
|
573
780
|
}, z.core.$strip>>;
|
|
574
781
|
}, z.core.$strip>]>;
|
|
575
|
-
declare const zTransactionData: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
576
|
-
type: z.ZodString;
|
|
782
|
+
declare const zTransactionData: z.ZodArray<z.ZodUnion<[z.ZodUnion<readonly [z.ZodObject<{
|
|
577
783
|
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
578
784
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
579
|
-
|
|
785
|
+
type: z.ZodLiteral<"urn:eudi:sca:payment:1">;
|
|
786
|
+
subtype: z.ZodUndefined;
|
|
787
|
+
payload: z.ZodObject<{
|
|
580
788
|
transaction_id: z.ZodString;
|
|
581
789
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
582
790
|
payee: z.ZodObject<{
|
|
@@ -624,28 +832,14 @@ declare const zTransactionData: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
|
624
832
|
apr: z.ZodOptional<z.ZodNumber>;
|
|
625
833
|
}, z.core.$strip>>;
|
|
626
834
|
}, z.core.$strip>>;
|
|
627
|
-
}, z.core.$strip
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
635
|
-
aisp: z.ZodOptional<z.ZodObject<{
|
|
636
|
-
legal_name: z.ZodString;
|
|
637
|
-
brand_name: z.ZodString;
|
|
638
|
-
domain_name: z.ZodString;
|
|
639
|
-
}, z.core.$strip>>;
|
|
640
|
-
description: z.ZodOptional<z.ZodString>;
|
|
641
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
835
|
+
}, z.core.$strip>;
|
|
836
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
837
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
838
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
839
|
+
type: z.ZodLiteral<"urn:eudi:sca:generic:1">;
|
|
840
|
+
subtype: z.ZodString;
|
|
841
|
+
payload: z.ZodObject<{
|
|
642
842
|
transaction_id: z.ZodString;
|
|
643
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
644
|
-
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
645
|
-
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
646
|
-
reference_number: z.ZodOptional<z.ZodString>;
|
|
647
|
-
creditor_id: z.ZodOptional<z.ZodString>;
|
|
648
|
-
purpose: z.ZodOptional<z.ZodString>;
|
|
649
843
|
payment_payload: z.ZodOptional<z.ZodObject<{
|
|
650
844
|
transaction_id: z.ZodString;
|
|
651
845
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -695,8 +889,14 @@ declare const zTransactionData: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
|
695
889
|
}, z.core.$strip>>;
|
|
696
890
|
}, z.core.$strip>>;
|
|
697
891
|
}, z.core.$strip>>;
|
|
698
|
-
}, z.core.$
|
|
892
|
+
}, z.core.$catchall<z.ZodNullable<z.ZodString>>>;
|
|
699
893
|
}, z.core.$strip>, z.ZodObject<{
|
|
894
|
+
type: z.ZodString;
|
|
895
|
+
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
896
|
+
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
897
|
+
subtype: z.ZodOptional<z.ZodString>;
|
|
898
|
+
payload: z.ZodUnknown;
|
|
899
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
700
900
|
type: z.ZodString;
|
|
701
901
|
credential_ids: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
702
902
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
@@ -762,30 +962,8 @@ declare const ts12BuiltinSchemaValidators: {
|
|
|
762
962
|
}, z.core.$strip>>;
|
|
763
963
|
}, z.core.$strip>>;
|
|
764
964
|
}, z.core.$strip>;
|
|
765
|
-
readonly "urn:eudi:sca:
|
|
766
|
-
transaction_id: z.ZodString;
|
|
767
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
768
|
-
service: z.ZodOptional<z.ZodString>;
|
|
769
|
-
action: z.ZodString;
|
|
770
|
-
}, z.core.$strip>;
|
|
771
|
-
readonly "urn:eudi:sca:account_access:1": z.ZodObject<{
|
|
772
|
-
transaction_id: z.ZodString;
|
|
773
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
774
|
-
aisp: z.ZodOptional<z.ZodObject<{
|
|
775
|
-
legal_name: z.ZodString;
|
|
776
|
-
brand_name: z.ZodString;
|
|
777
|
-
domain_name: z.ZodString;
|
|
778
|
-
}, z.core.$strip>>;
|
|
779
|
-
description: z.ZodOptional<z.ZodString>;
|
|
780
|
-
}, z.core.$strip>;
|
|
781
|
-
readonly "urn:eudi:sca:emandate:1": z.ZodObject<{
|
|
965
|
+
readonly "urn:eudi:sca:generic:1": z.ZodObject<{
|
|
782
966
|
transaction_id: z.ZodString;
|
|
783
|
-
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
784
|
-
start_date: z.ZodOptional<z.ZodISODateTime>;
|
|
785
|
-
end_date: z.ZodOptional<z.ZodISODateTime>;
|
|
786
|
-
reference_number: z.ZodOptional<z.ZodString>;
|
|
787
|
-
creditor_id: z.ZodOptional<z.ZodString>;
|
|
788
|
-
purpose: z.ZodOptional<z.ZodString>;
|
|
789
967
|
payment_payload: z.ZodOptional<z.ZodObject<{
|
|
790
968
|
transaction_id: z.ZodString;
|
|
791
969
|
date_time: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -835,7 +1013,7 @@ declare const ts12BuiltinSchemaValidators: {
|
|
|
835
1013
|
}, z.core.$strip>>;
|
|
836
1014
|
}, z.core.$strip>>;
|
|
837
1015
|
}, z.core.$strip>>;
|
|
838
|
-
}, z.core.$
|
|
1016
|
+
}, z.core.$catchall<z.ZodNullable<z.ZodString>>>;
|
|
839
1017
|
};
|
|
840
1018
|
//#endregion
|
|
841
1019
|
//#region src/verifyOpenid4VpAuthorizationRequest.d.ts
|
|
@@ -858,5 +1036,5 @@ declare const verifyOpenid4VpAuthorizationRequest: (agentContext: AgentContext,
|
|
|
858
1036
|
x509RegistrationCertificate: X509Certificate;
|
|
859
1037
|
}[] | undefined>;
|
|
860
1038
|
//#endregion
|
|
861
|
-
export { EudiWalletExtensionsError, FunkeQesTransactionDataEntry,
|
|
1039
|
+
export { EudiWalletExtensionsError, FunkeQesTransactionDataEntry, GlobalMergeConfig, GlobalValidator, MergeConfig, MergeResult, MergeStrategy, ResolvedTs12Metadata, TransactionData, TransactionDataEntry, Ts12GenericPayload, Ts12IntegrityError, Ts12PaymentPayload, Ts12TransactionDataEntry, URN_SCA_GENERIC, URN_SCA_PAYMENT, ZScaAttestationExt, baseMergeConfig, defaultValidator, mergeJson, resolveTs12TransactionDisplayMetadata, ts12BuiltinSchemaValidators, ts12MergeConfig, verifyOpenid4VpAuthorizationRequest, zFunkeQesTransaction, zGenericPayload, zPaymentPayload, zScaAttestationExt, zScaTransactionDataTypeClaims, zScaTransactionDataTypeUiLabels, zTransactionData, zTransactionDataEntry, zTs12FallbackTransaction, zTs12GenericTransaction, zTs12PaymentTransaction, zTs12Transaction };
|
|
862
1040
|
//# sourceMappingURL=index.d.mts.map
|