@pagopa/io-react-native-wallet 2.0.0-next.3 → 2.0.0-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/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/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +3 -3
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +45 -34
- package/lib/commonjs/credential/issuance/types.js +1 -0
- 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 +7 -8
- 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/{02-status-attestation.js → 02-status-assertion.js} +28 -22
- package/lib/commonjs/credential/status/02-status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js +85 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +22 -20
- package/lib/commonjs/credential/status/index.js +6 -6
- package/lib/commonjs/credential/status/index.js.map +1 -1
- package/lib/commonjs/credential/status/types.js +48 -15
- package/lib/commonjs/credential/status/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +6 -1
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +25 -9
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/utils/credentials.js +33 -0
- package/lib/commonjs/utils/credentials.js.map +1 -0
- package/lib/commonjs/utils/crypto.js +1 -7
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/jwk.js +12 -0
- package/lib/commonjs/utils/jwk.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +1 -2
- package/lib/commonjs/wallet-instance-attestation/types.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/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +4 -4
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +45 -34
- package/lib/module/credential/issuance/types.js +1 -0
- 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 +7 -8
- 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/{02-status-attestation.js → 02-status-assertion.js} +28 -22
- package/lib/module/credential/status/02-status-assertion.js.map +1 -0
- package/lib/module/credential/status/03-verify-and-parse-status-assertion.js +78 -0
- package/lib/module/credential/status/03-verify-and-parse-status-assertion.js.map +1 -0
- package/lib/module/credential/status/README.md +22 -20
- package/lib/module/credential/status/index.js +3 -3
- package/lib/module/credential/status/index.js.map +1 -1
- package/lib/module/credential/status/types.js +43 -12
- package/lib/module/credential/status/types.js.map +1 -1
- package/lib/module/sd-jwt/index.js +6 -1
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +25 -9
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/utils/credentials.js +26 -0
- package/lib/module/utils/credentials.js.map +1 -0
- package/lib/module/utils/crypto.js +2 -8
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/jwk.js +11 -1
- package/lib/module/utils/jwk.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +1 -2
- package/lib/module/wallet-instance-attestation/types.js.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/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +3 -0
- 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/02-status-assertion.d.ts +23 -0
- package/lib/typescript/credential/status/02-status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts +21 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +4 -4
- package/lib/typescript/credential/status/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/types.d.ts +499 -22
- package/lib/typescript/credential/status/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +68 -40
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +97 -46
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/utils/credentials.d.ts +11 -0
- package/lib/typescript/utils/credentials.d.ts.map +1 -0
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/jwk.d.ts +7 -0
- package/lib/typescript/utils/jwk.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/credential/issuance/04-complete-user-authorization.ts +79 -85
- package/src/credential/issuance/06-obtain-credential.ts +4 -1
- package/src/credential/issuance/07-verify-and-parse-credential.ts +4 -6
- package/src/credential/issuance/README.md +45 -34
- package/src/credential/issuance/types.ts +1 -0
- package/src/credential/presentation/07-evaluate-dcql-query.ts +16 -17
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +16 -13
- package/src/credential/presentation/types.ts +1 -2
- package/src/credential/status/{02-status-attestation.ts → 02-status-assertion.ts} +37 -28
- package/src/credential/status/03-verify-and-parse-status-assertion.ts +109 -0
- package/src/credential/status/README.md +22 -20
- package/src/credential/status/index.ts +7 -14
- package/src/credential/status/types.ts +62 -15
- package/src/sd-jwt/index.ts +5 -1
- package/src/sd-jwt/types.ts +24 -10
- package/src/utils/credentials.ts +29 -0
- package/src/utils/crypto.ts +12 -20
- package/src/utils/jwk.ts +15 -1
- package/src/wallet-instance-attestation/types.ts +1 -1
- package/lib/commonjs/credential/status/02-status-attestation.js.map +0 -1
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +0 -55
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
- package/lib/module/credential/status/02-status-attestation.js.map +0 -1
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +0 -49
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
- package/lib/typescript/credential/status/02-status-attestation.d.ts +0 -19
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +0 -1
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +0 -24
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +0 -1
- package/src/credential/status/03-verify-and-parse-status-attestation.ts +0 -70
@@ -1,16 +1,20 @@
|
|
1
1
|
import { InputDescriptor, type LegacyRemotePresentation } from "./types";
|
2
2
|
import { SdJwt4VC, type DisclosureWithEncoded } from "../../sd-jwt/types";
|
3
|
+
import type { CryptoContext } from "@pagopa/io-react-native-jwt";
|
3
4
|
export type EvaluatedDisclosures = {
|
4
5
|
requiredDisclosures: DisclosureWithEncoded[];
|
5
6
|
optionalDisclosures: DisclosureWithEncoded[];
|
6
7
|
unrequestedDisclosures: DisclosureWithEncoded[];
|
7
8
|
};
|
8
9
|
export type EvaluateInputDescriptorSdJwt4VC = (inputDescriptor: InputDescriptor, payloadCredential: SdJwt4VC["payload"], disclosures: DisclosureWithEncoded[]) => EvaluatedDisclosures;
|
9
|
-
export type EvaluateInputDescriptors = (descriptors: InputDescriptor[], credentialsSdJwt: [
|
10
|
+
export type EvaluateInputDescriptors = (descriptors: InputDescriptor[], credentialsSdJwt: [
|
11
|
+
CryptoContext,
|
12
|
+
string
|
13
|
+
][]) => Promise<{
|
10
14
|
evaluatedDisclosure: EvaluatedDisclosures;
|
11
15
|
inputDescriptor: InputDescriptor;
|
12
16
|
credential: string;
|
13
|
-
|
17
|
+
cryptoContext: CryptoContext;
|
14
18
|
}[]>;
|
15
19
|
/**
|
16
20
|
* @deprecated Use `prepareRemotePresentations` from DCQL
|
@@ -19,7 +23,7 @@ export type PrepareLegacyRemotePresentations = (credentialAndDescriptors: {
|
|
19
23
|
requestedClaims: string[];
|
20
24
|
inputDescriptor: InputDescriptor;
|
21
25
|
credential: string;
|
22
|
-
|
26
|
+
cryptoContext: CryptoContext;
|
23
27
|
}[], nonce: string, client_id: string) => Promise<LegacyRemotePresentation[]>;
|
24
28
|
/**
|
25
29
|
* Evaluates an InputDescriptor for an SD-JWT-based verifiable credential.
|
@@ -41,7 +45,7 @@ export type PrepareLegacyRemotePresentations = (credentialAndDescriptors: {
|
|
41
45
|
*/
|
42
46
|
export declare const evaluateInputDescriptorForSdJwt4VC: EvaluateInputDescriptorSdJwt4VC;
|
43
47
|
type DecodedCredentialSdJwt = {
|
44
|
-
|
48
|
+
cryptoContext: CryptoContext;
|
45
49
|
credential: string;
|
46
50
|
sdJwt: SdJwt4VC;
|
47
51
|
disclosures: DisclosureWithEncoded[];
|
@@ -54,8 +58,8 @@ type DecodedCredentialSdJwt = {
|
|
54
58
|
*/
|
55
59
|
export declare const findCredentialSdJwt: (inputDescriptor: InputDescriptor, decodedSdJwtCredentials: DecodedCredentialSdJwt[]) => {
|
56
60
|
matchedEvaluation: EvaluatedDisclosures;
|
57
|
-
matchedKeyTag: string;
|
58
61
|
matchedCredential: string;
|
62
|
+
cryptoContext: CryptoContext;
|
59
63
|
};
|
60
64
|
/**
|
61
65
|
* Evaluates multiple input descriptors against provided SD-JWT and MDOC credentials.
|
@@ -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,EAAE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H,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;AAEj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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"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { type Out } from "../../utils/misc";
|
2
|
+
import type { EvaluateIssuerTrust, ObtainCredential } from "../issuance";
|
3
|
+
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
4
|
+
export type StatusAssertion = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"], context: {
|
5
|
+
credentialCryptoContext: CryptoContext;
|
6
|
+
wiaCryptoContext: CryptoContext;
|
7
|
+
appFetch?: GlobalFetch["fetch"];
|
8
|
+
}) => Promise<{
|
9
|
+
statusAssertion: string;
|
10
|
+
}>;
|
11
|
+
/**
|
12
|
+
* Get the status assertion of a digital credential.
|
13
|
+
* @param issuerConf - The issuer's configuration
|
14
|
+
* @param credential - The credential to be verified
|
15
|
+
* @param format - The format of the credential, e.g. "sd-jwt"
|
16
|
+
* @param context.credentialCryptoContext - The credential's crypto context
|
17
|
+
* @param context.wiaCryptoContext - The Wallet Attestation's crypto context
|
18
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
19
|
+
* @throws {IssuerResponseError} with a specific code for more context
|
20
|
+
* @returns The credential status assertion
|
21
|
+
*/
|
22
|
+
export declare const statusAssertion: StatusAssertion;
|
23
|
+
//# sourceMappingURL=02-status-assertion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"02-status-assertion.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/02-status-assertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,GAAG,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,6BAA6B,CAAC;AAY1E,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EACvC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC,gBAAgB,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,eAoD7B,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { Out } from "../../utils/misc";
|
2
|
+
import type { EvaluateIssuerTrust, StatusAssertion } from ".";
|
3
|
+
import { ParsedStatusAssertion } from "./types";
|
4
|
+
import type { ObtainCredential } from "../issuance";
|
5
|
+
export type VerifyAndParseStatusAssertion = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], statusAssertion: Out<StatusAssertion>, credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"]) => Promise<{
|
6
|
+
parsedStatusAssertion: ParsedStatusAssertion;
|
7
|
+
}>;
|
8
|
+
/**
|
9
|
+
* Given a status assertion, verifies that:
|
10
|
+
* - It's in the supported format;
|
11
|
+
* - The assertion is correctly signed;
|
12
|
+
* - It's bound to the given key.
|
13
|
+
* @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
|
14
|
+
* @param statusAssertion The encoded status assertion returned by {@link statusAssertion}
|
15
|
+
* @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
|
16
|
+
* @returns A parsed status assertion
|
17
|
+
* @throws {IoWalletError} If the credential signature is not verified with the Issuer key set
|
18
|
+
* @throws {IssuerResponseError} If the status assertion contains an error or the credential status is invalid
|
19
|
+
*/
|
20
|
+
export declare const verifyAndParseStatusAssertion: VerifyAndParseStatusAssertion;
|
21
|
+
//# sourceMappingURL=03-verify-and-parse-status-assertion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"03-verify-and-parse-status-assertion.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/03-verify-and-parse-status-assertion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAO5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC;AAC9D,OAAO,EAEL,qBAAqB,EAItB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,MAAM,6BAA6B,GAAG,CAC1C,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,eAAe,EAAE,GAAG,CAAC,eAAe,CAAC,EACrC,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,KACpC,OAAO,CAAC;IAAE,qBAAqB,EAAE,qBAAqB,CAAA;CAAE,CAAC,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,EAAE,6BAiDzC,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type StartFlow } from "./01-start-flow";
|
2
|
-
import {
|
2
|
+
import { statusAssertion, type StatusAssertion } from "./02-status-assertion";
|
3
3
|
import { evaluateIssuerTrust, type EvaluateIssuerTrust } from "../issuance";
|
4
|
-
import {
|
5
|
-
export { evaluateIssuerTrust,
|
6
|
-
export type { StartFlow, EvaluateIssuerTrust,
|
4
|
+
import { verifyAndParseStatusAssertion, type VerifyAndParseStatusAssertion } from "./03-verify-and-parse-status-assertion";
|
5
|
+
export { evaluateIssuerTrust, statusAssertion, verifyAndParseStatusAssertion };
|
6
|
+
export type { StartFlow, EvaluateIssuerTrust, StatusAssertion, VerifyAndParseStatusAssertion, };
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,6BAA6B,EAC7B,KAAK,6BAA6B,EACnC,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC;AAC/E,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,6BAA6B,GAC9B,CAAC"}
|