@pagopa/io-react-native-wallet 2.0.0-next.2 → 2.0.0-next.4
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/lib/commonjs/credential/issuance/03-start-user-authorization.js +38 -24
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +75 -57
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +6 -10
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +43 -11
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +51 -48
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +77 -45
- package/lib/commonjs/credential/issuance/const.js +1 -1
- package/lib/commonjs/credential/issuance/types.js +17 -10
- package/lib/commonjs/credential/issuance/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +6 -13
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +10 -11
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +1 -1
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/credential/status/README.md +0 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +11 -15
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +5 -2
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/utils.test.js +37 -0
- package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -0
- package/lib/commonjs/sd-jwt/index.js +26 -1
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +71 -8
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/utils.js +64 -0
- package/lib/commonjs/sd-jwt/utils.js.map +1 -0
- package/lib/commonjs/trust/types.js +18 -13
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/par.js +32 -22
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/pop.js +1 -1
- package/lib/commonjs/utils/pop.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +4 -1
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/credential/issuance/03-start-user-authorization.js +38 -24
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +76 -58
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +6 -10
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +44 -12
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +51 -48
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +77 -45
- package/lib/module/credential/issuance/const.js +1 -1
- package/lib/module/credential/issuance/types.js +13 -8
- package/lib/module/credential/issuance/types.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +6 -13
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +10 -11
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/module/credential/presentation/types.js +1 -1
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/credential/status/README.md +0 -1
- package/lib/module/sd-jwt/__test__/index.test.js +11 -16
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +5 -2
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/utils.test.js +35 -0
- package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -0
- package/lib/module/sd-jwt/index.js +7 -1
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +70 -7
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/utils.js +57 -0
- package/lib/module/sd-jwt/utils.js.map +1 -0
- package/lib/module/trust/types.js +18 -13
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/par.js +29 -20
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/pop.js +1 -1
- package/lib/module/utils/pop.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +4 -1
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +12 -12
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +2 -2
- package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +7 -6
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +7 -14
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +10 -5
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -2
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/const.d.ts +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +49 -26
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +2 -2
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +4 -3
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +9 -5
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +3 -4
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/types.d.ts +4 -4
- package/lib/typescript/pid/sd-jwt/types.d.ts +7 -7
- package/lib/typescript/sd-jwt/__test__/utils.test.d.ts +2 -0
- package/lib/typescript/sd-jwt/__test__/utils.test.d.ts.map +1 -0
- package/lib/typescript/sd-jwt/index.d.ts +69 -28
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +264 -31
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts +18 -0
- package/lib/typescript/sd-jwt/utils.d.ts.map +1 -0
- package/lib/typescript/trust/build-chain.d.ts +30 -14
- package/lib/typescript/trust/build-chain.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +322 -158
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +29 -13
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +9 -9
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/credential/issuance/01-start-flow.ts +2 -2
- package/src/credential/issuance/03-start-user-authorization.ts +57 -38
- package/src/credential/issuance/04-complete-user-authorization.ts +79 -85
- package/src/credential/issuance/05-authorize-access.ts +5 -11
- package/src/credential/issuance/06-obtain-credential.ts +56 -23
- package/src/credential/issuance/07-verify-and-parse-credential.ts +54 -62
- package/src/credential/issuance/README.md +77 -45
- package/src/credential/issuance/const.ts +1 -1
- package/src/credential/issuance/types.ts +19 -8
- package/src/credential/presentation/07-evaluate-dcql-query.ts +16 -17
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +19 -16
- package/src/credential/presentation/types.ts +1 -2
- package/src/credential/status/README.md +0 -1
- package/src/sd-jwt/__test__/index.test.ts +8 -29
- package/src/sd-jwt/__test__/types.test.ts +6 -2
- package/src/sd-jwt/__test__/utils.test.ts +37 -0
- package/src/sd-jwt/index.ts +7 -1
- package/src/sd-jwt/types.ts +68 -7
- package/src/sd-jwt/utils.ts +73 -0
- package/src/trust/types.ts +23 -17
- package/src/utils/par.ts +37 -21
- package/src/utils/pop.ts +1 -1
- package/src/wallet-instance-attestation/types.ts +3 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"07-evaluate-input-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-input-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"07-evaluate-input-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-input-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAK1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAKjE,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C,sBAAsB,EAAE,qBAAqB,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G;AACH,eAAO,MAAM,wBAAwB,EAAE,wBA0CtC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gCAAgC,EAAE,gCA6B5C,CAAC"}
|
@@ -26,7 +26,6 @@ export type LegacyRemotePresentation = {
|
|
26
26
|
export type RemotePresentation = {
|
27
27
|
requestedClaims: string[];
|
28
28
|
credentialId: string;
|
29
|
-
format: string;
|
30
29
|
vpToken: string;
|
31
30
|
};
|
32
31
|
export type InputDescriptor = z.infer<typeof InputDescriptor>;
|
@@ -349,7 +348,7 @@ export declare const RequestObject: z.ZodObject<{
|
|
349
348
|
state: z.ZodOptional<z.ZodString>;
|
350
349
|
nonce: z.ZodString;
|
351
350
|
response_uri: z.ZodString;
|
352
|
-
|
351
|
+
request_uri_method: z.ZodOptional<z.ZodString>;
|
353
352
|
response_type: z.ZodLiteral<"vp_token">;
|
354
353
|
response_mode: z.ZodLiteral<"direct_post.jwt">;
|
355
354
|
client_id: z.ZodString;
|
@@ -582,7 +581,7 @@ export declare const RequestObject: z.ZodObject<{
|
|
582
581
|
response_mode: "direct_post.jwt";
|
583
582
|
client_id: string;
|
584
583
|
state?: string | undefined;
|
585
|
-
|
584
|
+
request_uri_method?: string | undefined;
|
586
585
|
dcql_query?: Record<string, any> | undefined;
|
587
586
|
scope?: string | undefined;
|
588
587
|
presentation_definition?: {
|
@@ -632,7 +631,7 @@ export declare const RequestObject: z.ZodObject<{
|
|
632
631
|
response_mode: "direct_post.jwt";
|
633
632
|
client_id: string;
|
634
633
|
state?: string | undefined;
|
635
|
-
|
634
|
+
request_uri_method?: string | undefined;
|
636
635
|
dcql_query?: Record<string, any> | undefined;
|
637
636
|
scope?: string | undefined;
|
638
637
|
presentation_definition?: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa,gJAOxB,CAAC;AAUH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAC;AACF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;IAMzC,CAAC"}
|
@@ -163,9 +163,9 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
163
163
|
exp: z.ZodNumber;
|
164
164
|
iat: z.ZodNumber;
|
165
165
|
}, "strip", z.ZodTypeAny, {
|
166
|
+
credential_hash_alg: string;
|
166
167
|
iat: number;
|
167
168
|
exp: number;
|
168
|
-
credential_hash_alg: string;
|
169
169
|
cnf: {
|
170
170
|
jwk: {
|
171
171
|
kty: "RSA" | "EC";
|
@@ -194,9 +194,9 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
194
194
|
};
|
195
195
|
credential_hash: string;
|
196
196
|
}, {
|
197
|
+
credential_hash_alg: string;
|
197
198
|
iat: number;
|
198
199
|
exp: number;
|
199
|
-
credential_hash_alg: string;
|
200
200
|
cnf: {
|
201
201
|
jwk: {
|
202
202
|
kty: "RSA" | "EC";
|
@@ -232,9 +232,9 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
232
232
|
kid?: string | undefined;
|
233
233
|
};
|
234
234
|
payload: {
|
235
|
+
credential_hash_alg: string;
|
235
236
|
iat: number;
|
236
237
|
exp: number;
|
237
|
-
credential_hash_alg: string;
|
238
238
|
cnf: {
|
239
239
|
jwk: {
|
240
240
|
kty: "RSA" | "EC";
|
@@ -270,9 +270,9 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
|
|
270
270
|
kid?: string | undefined;
|
271
271
|
};
|
272
272
|
payload: {
|
273
|
+
credential_hash_alg: string;
|
273
274
|
iat: number;
|
274
275
|
exp: number;
|
275
|
-
credential_hash_alg: string;
|
276
276
|
cnf: {
|
277
277
|
jwk: {
|
278
278
|
kty: "RSA" | "EC";
|
@@ -67,8 +67,6 @@ export declare const PID: z.ZodObject<{
|
|
67
67
|
};
|
68
68
|
}>, "many">;
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
70
|
-
trustFramework: "eidas";
|
71
|
-
assuranceLevel: string;
|
72
70
|
evidence: {
|
73
71
|
type: string;
|
74
72
|
record: {
|
@@ -80,9 +78,9 @@ export declare const PID: z.ZodObject<{
|
|
80
78
|
};
|
81
79
|
};
|
82
80
|
}[];
|
83
|
-
}, {
|
84
81
|
trustFramework: "eidas";
|
85
82
|
assuranceLevel: string;
|
83
|
+
}, {
|
86
84
|
evidence: {
|
87
85
|
type: string;
|
88
86
|
record: {
|
@@ -94,6 +92,8 @@ export declare const PID: z.ZodObject<{
|
|
94
92
|
};
|
95
93
|
};
|
96
94
|
}[];
|
95
|
+
trustFramework: "eidas";
|
96
|
+
assuranceLevel: string;
|
97
97
|
}>>;
|
98
98
|
claims: z.ZodObject<{
|
99
99
|
uniqueId: z.ZodString;
|
@@ -148,8 +148,6 @@ export declare const PID: z.ZodObject<{
|
|
148
148
|
expiration: Date;
|
149
149
|
issuedAt: Date;
|
150
150
|
verification?: {
|
151
|
-
trustFramework: "eidas";
|
152
|
-
assuranceLevel: string;
|
153
151
|
evidence: {
|
154
152
|
type: string;
|
155
153
|
record: {
|
@@ -161,6 +159,8 @@ export declare const PID: z.ZodObject<{
|
|
161
159
|
};
|
162
160
|
};
|
163
161
|
}[];
|
162
|
+
trustFramework: "eidas";
|
163
|
+
assuranceLevel: string;
|
164
164
|
} | undefined;
|
165
165
|
}, {
|
166
166
|
claims: {
|
@@ -178,8 +178,6 @@ export declare const PID: z.ZodObject<{
|
|
178
178
|
expiration: Date;
|
179
179
|
issuedAt: Date;
|
180
180
|
verification?: {
|
181
|
-
trustFramework: "eidas";
|
182
|
-
assuranceLevel: string;
|
183
181
|
evidence: {
|
184
182
|
type: string;
|
185
183
|
record: {
|
@@ -191,6 +189,8 @@ export declare const PID: z.ZodObject<{
|
|
191
189
|
};
|
192
190
|
};
|
193
191
|
}[];
|
192
|
+
trustFramework: "eidas";
|
193
|
+
assuranceLevel: string;
|
194
194
|
} | undefined;
|
195
195
|
}>;
|
196
196
|
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../../src/sd-jwt/__test__/utils.test.ts"],"names":[],"mappings":""}
|
@@ -3,6 +3,7 @@ import { Disclosure, SdJwt4VC, type DisclosureWithEncoded } from "./types";
|
|
3
3
|
import type { JWK } from "../utils/jwk";
|
4
4
|
import * as Errors from "./errors";
|
5
5
|
import { type Presentation } from "../credential/presentation/types";
|
6
|
+
export * from "./utils";
|
6
7
|
/**
|
7
8
|
* Decode a given SD-JWT with Disclosures to get the parsed SD-JWT object they define.
|
8
9
|
* It ensures provided data is in a valid shape.
|
@@ -20,16 +21,14 @@ import { type Presentation } from "../credential/presentation/types";
|
|
20
21
|
export declare const decode: <S extends z.ZodType<{
|
21
22
|
header: {
|
22
23
|
alg: string;
|
23
|
-
|
24
|
-
|
24
|
+
kid: string;
|
25
|
+
typ: "vc+sd-jwt" | "dc+sd-jwt";
|
26
|
+
trust_chain?: string[] | undefined;
|
27
|
+
x5c?: string[] | undefined;
|
28
|
+
vctm?: string[] | undefined;
|
25
29
|
};
|
26
30
|
payload: {
|
27
31
|
iss: string;
|
28
|
-
status: {
|
29
|
-
status_attestation: {
|
30
|
-
credential_hash_alg: "sha-256";
|
31
|
-
};
|
32
|
-
};
|
33
32
|
sub: string;
|
34
33
|
exp: number;
|
35
34
|
_sd_alg: "sha-256";
|
@@ -61,22 +60,32 @@ export declare const decode: <S extends z.ZodType<{
|
|
61
60
|
};
|
62
61
|
vct: string;
|
63
62
|
iat?: number | undefined;
|
63
|
+
status?: {
|
64
|
+
status_assertion: {
|
65
|
+
credential_hash_alg: "sha-256";
|
66
|
+
};
|
67
|
+
} | {
|
68
|
+
status_attestation: {
|
69
|
+
credential_hash_alg: "sha-256";
|
70
|
+
};
|
71
|
+
} | undefined;
|
72
|
+
"vct#integrity"?: string | undefined;
|
73
|
+
issuing_authority?: string | undefined;
|
74
|
+
issuing_country?: string | undefined;
|
64
75
|
} & {
|
65
76
|
_sd: string[];
|
66
77
|
};
|
67
78
|
}, z.ZodTypeDef, {
|
68
79
|
header: {
|
69
80
|
alg: string;
|
70
|
-
|
71
|
-
|
81
|
+
kid: string;
|
82
|
+
typ: "vc+sd-jwt" | "dc+sd-jwt";
|
83
|
+
trust_chain?: string[] | undefined;
|
84
|
+
x5c?: string[] | undefined;
|
85
|
+
vctm?: string[] | undefined;
|
72
86
|
};
|
73
87
|
payload: {
|
74
88
|
iss: string;
|
75
|
-
status: {
|
76
|
-
status_attestation: {
|
77
|
-
credential_hash_alg: "sha-256";
|
78
|
-
};
|
79
|
-
};
|
80
89
|
sub: string;
|
81
90
|
exp: number;
|
82
91
|
_sd_alg: "sha-256";
|
@@ -108,6 +117,18 @@ export declare const decode: <S extends z.ZodType<{
|
|
108
117
|
};
|
109
118
|
vct: string;
|
110
119
|
iat?: number | undefined;
|
120
|
+
status?: {
|
121
|
+
status_assertion: {
|
122
|
+
credential_hash_alg: "sha-256";
|
123
|
+
};
|
124
|
+
} | {
|
125
|
+
status_attestation: {
|
126
|
+
credential_hash_alg: "sha-256";
|
127
|
+
};
|
128
|
+
} | undefined;
|
129
|
+
"vct#integrity"?: string | undefined;
|
130
|
+
issuing_authority?: string | undefined;
|
131
|
+
issuing_country?: string | undefined;
|
111
132
|
} & {
|
112
133
|
_sd: string[];
|
113
134
|
};
|
@@ -154,16 +175,14 @@ export declare const disclose: (token: string, claims: string[]) => Promise<{
|
|
154
175
|
export declare const verify: <S extends z.ZodType<{
|
155
176
|
header: {
|
156
177
|
alg: string;
|
157
|
-
|
158
|
-
|
178
|
+
kid: string;
|
179
|
+
typ: "vc+sd-jwt" | "dc+sd-jwt";
|
180
|
+
trust_chain?: string[] | undefined;
|
181
|
+
x5c?: string[] | undefined;
|
182
|
+
vctm?: string[] | undefined;
|
159
183
|
};
|
160
184
|
payload: {
|
161
185
|
iss: string;
|
162
|
-
status: {
|
163
|
-
status_attestation: {
|
164
|
-
credential_hash_alg: "sha-256";
|
165
|
-
};
|
166
|
-
};
|
167
186
|
sub: string;
|
168
187
|
exp: number;
|
169
188
|
_sd_alg: "sha-256";
|
@@ -195,22 +214,32 @@ export declare const verify: <S extends z.ZodType<{
|
|
195
214
|
};
|
196
215
|
vct: string;
|
197
216
|
iat?: number | undefined;
|
217
|
+
status?: {
|
218
|
+
status_assertion: {
|
219
|
+
credential_hash_alg: "sha-256";
|
220
|
+
};
|
221
|
+
} | {
|
222
|
+
status_attestation: {
|
223
|
+
credential_hash_alg: "sha-256";
|
224
|
+
};
|
225
|
+
} | undefined;
|
226
|
+
"vct#integrity"?: string | undefined;
|
227
|
+
issuing_authority?: string | undefined;
|
228
|
+
issuing_country?: string | undefined;
|
198
229
|
} & {
|
199
230
|
_sd: string[];
|
200
231
|
};
|
201
232
|
}, z.ZodTypeDef, {
|
202
233
|
header: {
|
203
234
|
alg: string;
|
204
|
-
|
205
|
-
|
235
|
+
kid: string;
|
236
|
+
typ: "vc+sd-jwt" | "dc+sd-jwt";
|
237
|
+
trust_chain?: string[] | undefined;
|
238
|
+
x5c?: string[] | undefined;
|
239
|
+
vctm?: string[] | undefined;
|
206
240
|
};
|
207
241
|
payload: {
|
208
242
|
iss: string;
|
209
|
-
status: {
|
210
|
-
status_attestation: {
|
211
|
-
credential_hash_alg: "sha-256";
|
212
|
-
};
|
213
|
-
};
|
214
243
|
sub: string;
|
215
244
|
exp: number;
|
216
245
|
_sd_alg: "sha-256";
|
@@ -242,6 +271,18 @@ export declare const verify: <S extends z.ZodType<{
|
|
242
271
|
};
|
243
272
|
vct: string;
|
244
273
|
iat?: number | undefined;
|
274
|
+
status?: {
|
275
|
+
status_assertion: {
|
276
|
+
credential_hash_alg: "sha-256";
|
277
|
+
};
|
278
|
+
} | {
|
279
|
+
status_attestation: {
|
280
|
+
credential_hash_alg: "sha-256";
|
281
|
+
};
|
282
|
+
} | undefined;
|
283
|
+
"vct#integrity"?: string | undefined;
|
284
|
+
issuing_authority?: string | undefined;
|
285
|
+
issuing_country?: string | undefined;
|
245
286
|
} & {
|
246
287
|
_sd: string[];
|
247
288
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,cAAc,SAAS,CAAC;AAQxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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