@pagopa/io-wallet-oid4vci 2.0.0-launchpad → 2.0.1-apt

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 CHANGED
@@ -119,6 +119,43 @@ declare function completeAuthorization(options: CompleteAuthorizationOptions): P
119
119
  */
120
120
  declare function sendAuthorizationResponseAndExtractCode(options: SendAuthorizationResponseAndExtractCodeOptions): Promise<AuthorizationResponse>;
121
121
 
122
+ /**
123
+ * Credential Offer schema
124
+ * IT-Wallet v1.4 specification: Section 5.1
125
+ *
126
+ * Represents a credential offer from a Credential Issuer to a wallet.
127
+ */
128
+ declare const zCredentialOfferAPTITUDE: z$1.ZodObject<{
129
+ credential_configuration_ids: z$1.ZodArray<z$1.ZodString>;
130
+ credential_issuer: z$1.ZodURL;
131
+ grants: z$1.ZodObject<{
132
+ authorization_code: z$1.ZodOptional<z$1.ZodObject<{
133
+ authorization_server: z$1.ZodOptional<z$1.ZodURL>;
134
+ issuer_state: z$1.ZodOptional<z$1.ZodString>;
135
+ }, z$1.core.$strip>>;
136
+ "urn:ietf:params:oauth:grant-type:pre-authorized_code": z$1.ZodOptional<z$1.ZodObject<{
137
+ authorization_server: z$1.ZodOptional<z$1.ZodURL>;
138
+ "pre-authorized_code": z$1.ZodString;
139
+ tx_code: z$1.ZodOptional<z$1.ZodObject<{
140
+ description: z$1.ZodOptional<z$1.ZodString>;
141
+ input_mode: z$1.ZodOptional<z$1.ZodEnum<{
142
+ numeric: "numeric";
143
+ digit: "digit";
144
+ }>>;
145
+ length: z$1.ZodOptional<z$1.ZodNumber>;
146
+ }, z$1.core.$strip>>;
147
+ }, z$1.core.$strip>>;
148
+ }, z$1.core.$strip>;
149
+ }, z$1.core.$strip>;
150
+ type CredentialOfferAPTITUDE = z$1.infer<typeof zCredentialOfferAPTITUDE>;
151
+ /**
152
+ * TypeScript enum for Credential Offer Supported Grants
153
+ */
154
+ declare enum CREDENTIAL_OFFER_GRANTS {
155
+ AUTHORIZATION_CODE = "authorization_code",
156
+ PREAUTHORIZED_CODE = "urn:ietf:params:oauth:grant-type:pre-authorized_code"
157
+ }
158
+
122
159
  /**
123
160
  * Authorization Code Grant schema
124
161
  * IT-Wallet v1.3 specification: Section 5.1
@@ -252,7 +289,7 @@ type CredentialOfferGrants = CredentialOfferGrantsV1_3 | CredentialOfferGrantsV1
252
289
  * TypeScript type for Credential Offer.
253
290
  * Union across supported IT-Wallet versions.
254
291
  */
255
- type CredentialOffer = CredentialOfferV1_3 | CredentialOfferV1_4;
292
+ type CredentialOffer = CredentialOfferAPTITUDE | CredentialOfferV1_3 | CredentialOfferV1_4;
256
293
  /**
257
294
  * TypeScript type for Credential Offer URI
258
295
  */
@@ -346,6 +383,12 @@ interface ResolveCredentialOfferOptionsV1_3 extends ResolveCredentialOfferOption
346
383
  interface ResolveCredentialOfferOptionsV1_4 extends ResolveCredentialOfferOptions {
347
384
  config: IoWalletSdkConfig<ItWalletSpecsVersion.V1_4>;
348
385
  }
386
+ /**
387
+ * Options for resolving a credential offer against the APTITUDE schema.
388
+ */
389
+ interface ResolveCredentialOfferOptionsAPTITUDE extends ResolveCredentialOfferOptions {
390
+ config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
391
+ }
349
392
  /**
350
393
  * Base options shared across all validate-credential-offer versions.
351
394
  */
@@ -378,7 +421,7 @@ interface ValidateCredentialOfferOptions extends BaseValidateCredentialOfferOpti
378
421
  /**
379
422
  * The credential offer to validate against the configured IT-Wallet specification.
380
423
  */
381
- credentialOffer: CredentialOfferV1_3 | CredentialOfferV1_4;
424
+ credentialOffer: CredentialOfferAPTITUDE | CredentialOfferV1_3 | CredentialOfferV1_4;
382
425
  }
383
426
  /**
384
427
  * Options for validating an IT-Wallet v1.3 credential offer.
@@ -400,6 +443,21 @@ interface ValidateCredentialOfferOptionsV1_4 extends ValidateCredentialOfferOpti
400
443
  */
401
444
  credentialOffer: CredentialOfferV1_4;
402
445
  }
446
+ /**
447
+ * Options for validating an APTITUDE credential offer.
448
+ */
449
+ interface ValidateCredentialOfferOptionsAPTITUDE extends ValidateCredentialOfferOptions {
450
+ config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
451
+ /**
452
+ * The credential offer to validate against APTITUDE specifications.
453
+ */
454
+ credentialOffer: CredentialOfferAPTITUDE;
455
+ /**
456
+ * The grant type to validate against APTITUDE specifications.
457
+ * OPTIONAL, default is "authorization_code".
458
+ */
459
+ grantType?: CREDENTIAL_OFFER_GRANTS;
460
+ }
403
461
  /**
404
462
  * Options for extracting grant details from a credential offer.
405
463
  */
@@ -408,7 +466,7 @@ interface ExtractGrantDetailsOptions {
408
466
  /**
409
467
  * The credential offer to extract grant details from.
410
468
  */
411
- credentialOffer: CredentialOfferV1_3 | CredentialOfferV1_4;
469
+ credentialOffer: CredentialOfferAPTITUDE | CredentialOfferV1_3 | CredentialOfferV1_4;
412
470
  }
413
471
  /**
414
472
  * Options for extracting grant details from an IT-Wallet v1.3 credential offer.
@@ -430,6 +488,16 @@ interface ExtractGrantDetailsOptionsV1_4 extends ExtractGrantDetailsOptions {
430
488
  */
431
489
  credentialOffer: CredentialOfferV1_4;
432
490
  }
491
+ /**
492
+ * Options for extracting grant details from an Aptitude credential offer.
493
+ */
494
+ interface ExtractGrantDetailsOptionsAPTITUDE extends ExtractGrantDetailsOptions {
495
+ config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
496
+ /**
497
+ * The credential offer to extract grant details from.
498
+ */
499
+ credentialOffer: CredentialOfferAPTITUDE;
500
+ }
433
501
  /**
434
502
  * Result of extracting grant details from an IT-Wallet v1.3 credential offer.
435
503
  */
@@ -437,7 +505,7 @@ interface ExtractGrantDetailsResultV1_3 {
437
505
  /**
438
506
  * Details of the authorization code grant.
439
507
  */
440
- authorizationCodeGrant: {
508
+ [CREDENTIAL_OFFER_GRANTS.AUTHORIZATION_CODE]: {
441
509
  /**
442
510
  * HTTPS URL of the Authorization Server.
443
511
  * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
@@ -454,11 +522,6 @@ interface ExtractGrantDetailsResultV1_3 {
454
522
  */
455
523
  scope: string;
456
524
  };
457
- /**
458
- * The type of grant present in the credential offer.
459
- * IT-Wallet only supports "authorization_code".
460
- */
461
- grantType: "authorization_code";
462
525
  }
463
526
  /**
464
527
  * Result of extracting grant details from an IT-Wallet v1.4 credential offer.
@@ -470,7 +533,7 @@ interface ExtractGrantDetailsResultV1_4 {
470
533
  /**
471
534
  * Details of the authorization code grant.
472
535
  */
473
- authorizationCodeGrant: {
536
+ [CREDENTIAL_OFFER_GRANTS.AUTHORIZATION_CODE]: {
474
537
  /**
475
538
  * HTTPS URL of the Authorization Server.
476
539
  * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
@@ -488,36 +551,100 @@ interface ExtractGrantDetailsResultV1_4 {
488
551
  */
489
552
  scope?: never;
490
553
  };
554
+ }
555
+ /**
556
+ * Result of extracting grant details from an APTITUDE credential offer.
557
+ *
558
+ * It is an object keyed by the OAuth grant type. Each supported grant is optional
559
+ * because an APTITUDE credential offer may provide either or both grant types.
560
+ *
561
+ * Difference from v1.4:
562
+ * - Supports both authorization code and pre-authorized code grants.
563
+ */
564
+ interface ExtractGrantDetailsResultAPTITUDE {
491
565
  /**
492
- * The type of grant present in the credential offer.
493
- * IT-Wallet only supports "authorization_code".
566
+ * Details of the authorization code grant.
494
567
  */
495
- grantType: "authorization_code";
568
+ [CREDENTIAL_OFFER_GRANTS.AUTHORIZATION_CODE]?: {
569
+ /**
570
+ * HTTPS URL of the Authorization Server.
571
+ * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
572
+ */
573
+ authorizationServer?: string;
574
+ /**
575
+ * String value representing the issuer state.
576
+ * OPTIONAL. Used to correlate the authorization request with the credential offer.
577
+ */
578
+ issuerState?: string;
579
+ /**
580
+ * Version 1.4 has dropped support for the scope field,
581
+ * But typescript inference might have trouble recognizing this fact
582
+ * in its union type, so this is needed
583
+ */
584
+ scope?: never;
585
+ };
586
+ [CREDENTIAL_OFFER_GRANTS.PREAUTHORIZED_CODE]?: {
587
+ /**
588
+ * HTTPS URL of the Authorization Server.
589
+ * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
590
+ */
591
+ authorizationServer?: string;
592
+ /**
593
+ * REQUIRED. The code representing the Credential Issuer's authorization for
594
+ * the Wallet to obtain Credentials of a certain type.
595
+ */
596
+ preAuthorizedCode: string;
597
+ /**
598
+ * OPTIONAL. Object indicating that a Transaction Code is required if present, even if empty.
599
+ * It describes the requirements for a Transaction Code, which the Authorization Server expects
600
+ * the End-User to present along with the Token Request in a Pre-Authorized Code Flow.
601
+ * If the Authorization Server does not expect a Transaction Code, this object is absent.
602
+ */
603
+ txCode?: {
604
+ /**
605
+ * OPTIONAL. String containing guidance for the Holder
606
+ * of the Wallet on how to obtain the Transaction Code.
607
+ */
608
+ description?: string;
609
+ /**
610
+ * OPTIONAL. String specifying the input character set.
611
+ * Possible values are numeric (only digits) and text (any characters).
612
+ * The default is numeric.
613
+ */
614
+ inputMode?: "digit" | "numeric";
615
+ /**
616
+ * OPTIONAL. Integer specifying the length of the Transaction Code.
617
+ */
618
+ length?: number;
619
+ };
620
+ };
496
621
  }
497
622
  /**
498
623
  * Result of extracting grant details from a credential offer.
499
624
  */
500
- type ExtractGrantDetailsResult = ExtractGrantDetailsResultV1_3 | ExtractGrantDetailsResultV1_4;
625
+ type ExtractGrantDetailsResult = ExtractGrantDetailsResultAPTITUDE | ExtractGrantDetailsResultV1_3 | ExtractGrantDetailsResultV1_4;
501
626
 
502
627
  /**
503
628
  * Extracts grant details from a credential offer according to the configured
504
- * Italian Wallet specification version.
629
+ * Italian Wallet specification version. Returns version-specific grant details keyed by grant type.
505
630
  *
506
- * IT-Wallet only supports the `authorization_code` grant type. Pre-authorized
507
- * code grants are NOT supported.
508
631
  *
509
632
  * Version Differences:
510
633
  * - v1.3: extracts `scope` (REQUIRED), `authorization_server` (OPTIONAL), `issuer_state` (OPTIONAL)
511
634
  * - v1.4: extracts `authorization_server` (OPTIONAL) and `issuer_state` (OPTIONAL); the
512
- * credential offer no longer carries a `scope`
635
+ * credential offer no longer carries a `scope`.
636
+ * - APTITUDE: extracts `authorization_server` (OPTIONAL), `pre-authorized_code` (REQUIRED), and `tx_code` (OPTIONAL).
637
+ * authorization_code properties are not mandatory anymore.
638
+ *
513
639
  *
514
640
  * @param options - Extraction options including the credential offer and version config
515
- * @returns Version-specific grant details containing the grant type and authorization code grant information
516
- * @throws {CredentialOfferError} If grants or the authorization_code grant is missing
641
+ * @returns Version-specific grant details keyed by grant type.
642
+ * @throws {CredentialOfferError} If grants or the either authorization_code or pre-authorized_code grants are missing
517
643
  * @throws {ItWalletSpecsVersionError} If the configured version does not support credential offers
518
644
  */
519
645
  declare function extractGrantDetails(options: ExtractGrantDetailsOptionsV1_3): ExtractGrantDetailsResultV1_3;
520
646
  declare function extractGrantDetails(options: ExtractGrantDetailsOptionsV1_4): ExtractGrantDetailsResultV1_4;
647
+ declare function extractGrantDetails(options: ExtractGrantDetailsOptionsAPTITUDE): ExtractGrantDetailsResultAPTITUDE;
521
648
  declare function extractGrantDetails(options: ExtractGrantDetailsOptions): ExtractGrantDetailsResult;
522
649
 
523
650
  /**
@@ -618,6 +745,7 @@ declare function parseCredentialOfferUri(options: ParseCredentialOfferUriOptions
618
745
  */
619
746
  declare function resolveCredentialOffer(options: ResolveCredentialOfferOptionsV1_3): Promise<CredentialOfferV1_3>;
620
747
  declare function resolveCredentialOffer(options: ResolveCredentialOfferOptionsV1_4): Promise<CredentialOfferV1_4>;
748
+ declare function resolveCredentialOffer(options: ResolveCredentialOfferOptionsAPTITUDE): Promise<CredentialOfferAPTITUDE>;
621
749
  declare function resolveCredentialOffer(options: ResolveCredentialOfferOptions): Promise<CredentialOffer>;
622
750
 
623
751
  /**
@@ -46964,7 +47092,7 @@ declare class WalletProvider {
46964
47092
  * status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
46965
47093
  * });
46966
47094
  *
46967
- * @example v1.4 - Wallet attestation with required wallet_link and wallet_name
47095
+ * @example v1.4, APTITUDE - Wallet attestation with required wallet_link and wallet_name
46968
47096
  * const jwt = await provider.createItWalletAttestationJwt({
46969
47097
  * callbacks: { hash: myHashCallback, signJwt: mySignJwtCallback },
46970
47098
  * dpopJwkPublic: myJwk,
@@ -46984,4 +47112,4 @@ declare class WalletProvider {
46984
47112
  createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
46985
47113
  }
46986
47114
 
46987
- export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, InvalidDpopProofError, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, type MetadataResponseV1_4, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zMetadataResponseV1_4, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
47115
+ export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, CREDENTIAL_OFFER_GRANTS, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsAPTITUDE, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultAPTITUDE, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, InvalidDpopProofError, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, type MetadataResponseV1_4, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsAPTITUDE, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsAPTITUDE, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zMetadataResponseV1_4, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
package/dist/index.d.ts CHANGED
@@ -119,6 +119,43 @@ declare function completeAuthorization(options: CompleteAuthorizationOptions): P
119
119
  */
120
120
  declare function sendAuthorizationResponseAndExtractCode(options: SendAuthorizationResponseAndExtractCodeOptions): Promise<AuthorizationResponse>;
121
121
 
122
+ /**
123
+ * Credential Offer schema
124
+ * IT-Wallet v1.4 specification: Section 5.1
125
+ *
126
+ * Represents a credential offer from a Credential Issuer to a wallet.
127
+ */
128
+ declare const zCredentialOfferAPTITUDE: z$1.ZodObject<{
129
+ credential_configuration_ids: z$1.ZodArray<z$1.ZodString>;
130
+ credential_issuer: z$1.ZodURL;
131
+ grants: z$1.ZodObject<{
132
+ authorization_code: z$1.ZodOptional<z$1.ZodObject<{
133
+ authorization_server: z$1.ZodOptional<z$1.ZodURL>;
134
+ issuer_state: z$1.ZodOptional<z$1.ZodString>;
135
+ }, z$1.core.$strip>>;
136
+ "urn:ietf:params:oauth:grant-type:pre-authorized_code": z$1.ZodOptional<z$1.ZodObject<{
137
+ authorization_server: z$1.ZodOptional<z$1.ZodURL>;
138
+ "pre-authorized_code": z$1.ZodString;
139
+ tx_code: z$1.ZodOptional<z$1.ZodObject<{
140
+ description: z$1.ZodOptional<z$1.ZodString>;
141
+ input_mode: z$1.ZodOptional<z$1.ZodEnum<{
142
+ numeric: "numeric";
143
+ digit: "digit";
144
+ }>>;
145
+ length: z$1.ZodOptional<z$1.ZodNumber>;
146
+ }, z$1.core.$strip>>;
147
+ }, z$1.core.$strip>>;
148
+ }, z$1.core.$strip>;
149
+ }, z$1.core.$strip>;
150
+ type CredentialOfferAPTITUDE = z$1.infer<typeof zCredentialOfferAPTITUDE>;
151
+ /**
152
+ * TypeScript enum for Credential Offer Supported Grants
153
+ */
154
+ declare enum CREDENTIAL_OFFER_GRANTS {
155
+ AUTHORIZATION_CODE = "authorization_code",
156
+ PREAUTHORIZED_CODE = "urn:ietf:params:oauth:grant-type:pre-authorized_code"
157
+ }
158
+
122
159
  /**
123
160
  * Authorization Code Grant schema
124
161
  * IT-Wallet v1.3 specification: Section 5.1
@@ -252,7 +289,7 @@ type CredentialOfferGrants = CredentialOfferGrantsV1_3 | CredentialOfferGrantsV1
252
289
  * TypeScript type for Credential Offer.
253
290
  * Union across supported IT-Wallet versions.
254
291
  */
255
- type CredentialOffer = CredentialOfferV1_3 | CredentialOfferV1_4;
292
+ type CredentialOffer = CredentialOfferAPTITUDE | CredentialOfferV1_3 | CredentialOfferV1_4;
256
293
  /**
257
294
  * TypeScript type for Credential Offer URI
258
295
  */
@@ -346,6 +383,12 @@ interface ResolveCredentialOfferOptionsV1_3 extends ResolveCredentialOfferOption
346
383
  interface ResolveCredentialOfferOptionsV1_4 extends ResolveCredentialOfferOptions {
347
384
  config: IoWalletSdkConfig<ItWalletSpecsVersion.V1_4>;
348
385
  }
386
+ /**
387
+ * Options for resolving a credential offer against the APTITUDE schema.
388
+ */
389
+ interface ResolveCredentialOfferOptionsAPTITUDE extends ResolveCredentialOfferOptions {
390
+ config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
391
+ }
349
392
  /**
350
393
  * Base options shared across all validate-credential-offer versions.
351
394
  */
@@ -378,7 +421,7 @@ interface ValidateCredentialOfferOptions extends BaseValidateCredentialOfferOpti
378
421
  /**
379
422
  * The credential offer to validate against the configured IT-Wallet specification.
380
423
  */
381
- credentialOffer: CredentialOfferV1_3 | CredentialOfferV1_4;
424
+ credentialOffer: CredentialOfferAPTITUDE | CredentialOfferV1_3 | CredentialOfferV1_4;
382
425
  }
383
426
  /**
384
427
  * Options for validating an IT-Wallet v1.3 credential offer.
@@ -400,6 +443,21 @@ interface ValidateCredentialOfferOptionsV1_4 extends ValidateCredentialOfferOpti
400
443
  */
401
444
  credentialOffer: CredentialOfferV1_4;
402
445
  }
446
+ /**
447
+ * Options for validating an APTITUDE credential offer.
448
+ */
449
+ interface ValidateCredentialOfferOptionsAPTITUDE extends ValidateCredentialOfferOptions {
450
+ config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
451
+ /**
452
+ * The credential offer to validate against APTITUDE specifications.
453
+ */
454
+ credentialOffer: CredentialOfferAPTITUDE;
455
+ /**
456
+ * The grant type to validate against APTITUDE specifications.
457
+ * OPTIONAL, default is "authorization_code".
458
+ */
459
+ grantType?: CREDENTIAL_OFFER_GRANTS;
460
+ }
403
461
  /**
404
462
  * Options for extracting grant details from a credential offer.
405
463
  */
@@ -408,7 +466,7 @@ interface ExtractGrantDetailsOptions {
408
466
  /**
409
467
  * The credential offer to extract grant details from.
410
468
  */
411
- credentialOffer: CredentialOfferV1_3 | CredentialOfferV1_4;
469
+ credentialOffer: CredentialOfferAPTITUDE | CredentialOfferV1_3 | CredentialOfferV1_4;
412
470
  }
413
471
  /**
414
472
  * Options for extracting grant details from an IT-Wallet v1.3 credential offer.
@@ -430,6 +488,16 @@ interface ExtractGrantDetailsOptionsV1_4 extends ExtractGrantDetailsOptions {
430
488
  */
431
489
  credentialOffer: CredentialOfferV1_4;
432
490
  }
491
+ /**
492
+ * Options for extracting grant details from an Aptitude credential offer.
493
+ */
494
+ interface ExtractGrantDetailsOptionsAPTITUDE extends ExtractGrantDetailsOptions {
495
+ config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
496
+ /**
497
+ * The credential offer to extract grant details from.
498
+ */
499
+ credentialOffer: CredentialOfferAPTITUDE;
500
+ }
433
501
  /**
434
502
  * Result of extracting grant details from an IT-Wallet v1.3 credential offer.
435
503
  */
@@ -437,7 +505,7 @@ interface ExtractGrantDetailsResultV1_3 {
437
505
  /**
438
506
  * Details of the authorization code grant.
439
507
  */
440
- authorizationCodeGrant: {
508
+ [CREDENTIAL_OFFER_GRANTS.AUTHORIZATION_CODE]: {
441
509
  /**
442
510
  * HTTPS URL of the Authorization Server.
443
511
  * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
@@ -454,11 +522,6 @@ interface ExtractGrantDetailsResultV1_3 {
454
522
  */
455
523
  scope: string;
456
524
  };
457
- /**
458
- * The type of grant present in the credential offer.
459
- * IT-Wallet only supports "authorization_code".
460
- */
461
- grantType: "authorization_code";
462
525
  }
463
526
  /**
464
527
  * Result of extracting grant details from an IT-Wallet v1.4 credential offer.
@@ -470,7 +533,7 @@ interface ExtractGrantDetailsResultV1_4 {
470
533
  /**
471
534
  * Details of the authorization code grant.
472
535
  */
473
- authorizationCodeGrant: {
536
+ [CREDENTIAL_OFFER_GRANTS.AUTHORIZATION_CODE]: {
474
537
  /**
475
538
  * HTTPS URL of the Authorization Server.
476
539
  * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
@@ -488,36 +551,100 @@ interface ExtractGrantDetailsResultV1_4 {
488
551
  */
489
552
  scope?: never;
490
553
  };
554
+ }
555
+ /**
556
+ * Result of extracting grant details from an APTITUDE credential offer.
557
+ *
558
+ * It is an object keyed by the OAuth grant type. Each supported grant is optional
559
+ * because an APTITUDE credential offer may provide either or both grant types.
560
+ *
561
+ * Difference from v1.4:
562
+ * - Supports both authorization code and pre-authorized code grants.
563
+ */
564
+ interface ExtractGrantDetailsResultAPTITUDE {
491
565
  /**
492
- * The type of grant present in the credential offer.
493
- * IT-Wallet only supports "authorization_code".
566
+ * Details of the authorization code grant.
494
567
  */
495
- grantType: "authorization_code";
568
+ [CREDENTIAL_OFFER_GRANTS.AUTHORIZATION_CODE]?: {
569
+ /**
570
+ * HTTPS URL of the Authorization Server.
571
+ * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
572
+ */
573
+ authorizationServer?: string;
574
+ /**
575
+ * String value representing the issuer state.
576
+ * OPTIONAL. Used to correlate the authorization request with the credential offer.
577
+ */
578
+ issuerState?: string;
579
+ /**
580
+ * Version 1.4 has dropped support for the scope field,
581
+ * But typescript inference might have trouble recognizing this fact
582
+ * in its union type, so this is needed
583
+ */
584
+ scope?: never;
585
+ };
586
+ [CREDENTIAL_OFFER_GRANTS.PREAUTHORIZED_CODE]?: {
587
+ /**
588
+ * HTTPS URL of the Authorization Server.
589
+ * OPTIONAL, but REQUIRED when the Credential Issuer uses multiple Authorization Servers.
590
+ */
591
+ authorizationServer?: string;
592
+ /**
593
+ * REQUIRED. The code representing the Credential Issuer's authorization for
594
+ * the Wallet to obtain Credentials of a certain type.
595
+ */
596
+ preAuthorizedCode: string;
597
+ /**
598
+ * OPTIONAL. Object indicating that a Transaction Code is required if present, even if empty.
599
+ * It describes the requirements for a Transaction Code, which the Authorization Server expects
600
+ * the End-User to present along with the Token Request in a Pre-Authorized Code Flow.
601
+ * If the Authorization Server does not expect a Transaction Code, this object is absent.
602
+ */
603
+ txCode?: {
604
+ /**
605
+ * OPTIONAL. String containing guidance for the Holder
606
+ * of the Wallet on how to obtain the Transaction Code.
607
+ */
608
+ description?: string;
609
+ /**
610
+ * OPTIONAL. String specifying the input character set.
611
+ * Possible values are numeric (only digits) and text (any characters).
612
+ * The default is numeric.
613
+ */
614
+ inputMode?: "digit" | "numeric";
615
+ /**
616
+ * OPTIONAL. Integer specifying the length of the Transaction Code.
617
+ */
618
+ length?: number;
619
+ };
620
+ };
496
621
  }
497
622
  /**
498
623
  * Result of extracting grant details from a credential offer.
499
624
  */
500
- type ExtractGrantDetailsResult = ExtractGrantDetailsResultV1_3 | ExtractGrantDetailsResultV1_4;
625
+ type ExtractGrantDetailsResult = ExtractGrantDetailsResultAPTITUDE | ExtractGrantDetailsResultV1_3 | ExtractGrantDetailsResultV1_4;
501
626
 
502
627
  /**
503
628
  * Extracts grant details from a credential offer according to the configured
504
- * Italian Wallet specification version.
629
+ * Italian Wallet specification version. Returns version-specific grant details keyed by grant type.
505
630
  *
506
- * IT-Wallet only supports the `authorization_code` grant type. Pre-authorized
507
- * code grants are NOT supported.
508
631
  *
509
632
  * Version Differences:
510
633
  * - v1.3: extracts `scope` (REQUIRED), `authorization_server` (OPTIONAL), `issuer_state` (OPTIONAL)
511
634
  * - v1.4: extracts `authorization_server` (OPTIONAL) and `issuer_state` (OPTIONAL); the
512
- * credential offer no longer carries a `scope`
635
+ * credential offer no longer carries a `scope`.
636
+ * - APTITUDE: extracts `authorization_server` (OPTIONAL), `pre-authorized_code` (REQUIRED), and `tx_code` (OPTIONAL).
637
+ * authorization_code properties are not mandatory anymore.
638
+ *
513
639
  *
514
640
  * @param options - Extraction options including the credential offer and version config
515
- * @returns Version-specific grant details containing the grant type and authorization code grant information
516
- * @throws {CredentialOfferError} If grants or the authorization_code grant is missing
641
+ * @returns Version-specific grant details keyed by grant type.
642
+ * @throws {CredentialOfferError} If grants or the either authorization_code or pre-authorized_code grants are missing
517
643
  * @throws {ItWalletSpecsVersionError} If the configured version does not support credential offers
518
644
  */
519
645
  declare function extractGrantDetails(options: ExtractGrantDetailsOptionsV1_3): ExtractGrantDetailsResultV1_3;
520
646
  declare function extractGrantDetails(options: ExtractGrantDetailsOptionsV1_4): ExtractGrantDetailsResultV1_4;
647
+ declare function extractGrantDetails(options: ExtractGrantDetailsOptionsAPTITUDE): ExtractGrantDetailsResultAPTITUDE;
521
648
  declare function extractGrantDetails(options: ExtractGrantDetailsOptions): ExtractGrantDetailsResult;
522
649
 
523
650
  /**
@@ -618,6 +745,7 @@ declare function parseCredentialOfferUri(options: ParseCredentialOfferUriOptions
618
745
  */
619
746
  declare function resolveCredentialOffer(options: ResolveCredentialOfferOptionsV1_3): Promise<CredentialOfferV1_3>;
620
747
  declare function resolveCredentialOffer(options: ResolveCredentialOfferOptionsV1_4): Promise<CredentialOfferV1_4>;
748
+ declare function resolveCredentialOffer(options: ResolveCredentialOfferOptionsAPTITUDE): Promise<CredentialOfferAPTITUDE>;
621
749
  declare function resolveCredentialOffer(options: ResolveCredentialOfferOptions): Promise<CredentialOffer>;
622
750
 
623
751
  /**
@@ -46964,7 +47092,7 @@ declare class WalletProvider {
46964
47092
  * status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
46965
47093
  * });
46966
47094
  *
46967
- * @example v1.4 - Wallet attestation with required wallet_link and wallet_name
47095
+ * @example v1.4, APTITUDE - Wallet attestation with required wallet_link and wallet_name
46968
47096
  * const jwt = await provider.createItWalletAttestationJwt({
46969
47097
  * callbacks: { hash: myHashCallback, signJwt: mySignJwtCallback },
46970
47098
  * dpopJwkPublic: myJwk,
@@ -46984,4 +47112,4 @@ declare class WalletProvider {
46984
47112
  createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
46985
47113
  }
46986
47114
 
46987
- export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, InvalidDpopProofError, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, type MetadataResponseV1_4, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zMetadataResponseV1_4, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
47115
+ export { type AuthorizationCodeGrant, type AuthorizationCodeGrantV1_3, type AuthorizationCodeGrantV1_4, type AuthorizationResponse, type BaseCredentialRequestOptions, CREDENTIAL_OFFER_GRANTS, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseOptionsV1_4, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferGrantsV1_3, type CredentialOfferGrantsV1_4, type CredentialOfferUri, type CredentialOfferV1_3, type CredentialOfferV1_4, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, type CredentialRequestOptionsV1_4, type CredentialRequestV1_0, type CredentialRequestV1_3, type CredentialResponse, type CredentialResponseEncryption, type CredentialResponseV1_0, type CredentialResponseV1_3, type DeferredCredentialResponseV1_0, type DeferredCredentialResponseV1_3, type DeferredFlowOptionsV1_0, type DeferredFlowOptionsV1_3, type ExtractGrantDetailsOptions, type ExtractGrantDetailsOptionsAPTITUDE, type ExtractGrantDetailsOptionsV1_3, type ExtractGrantDetailsOptionsV1_4, type ExtractGrantDetailsResult, type ExtractGrantDetailsResultAPTITUDE, type ExtractGrantDetailsResultV1_3, type ExtractGrantDetailsResultV1_4, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, InvalidDpopProofError, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, type MetadataResponseV1_4, MissingDpopProofError, NonceRequestError, Oid4vciError, type ParseCredentialOfferUriOptions, ParseCredentialRequestError, type ParseCredentialRequestExpectedValues, type ParseCredentialRequestOptions, type ParsedCredentialProof, type ParsedCredentialRequest, type ProofJwtHeader, type ProofJwtHeaderV1_0, type ProofJwtHeaderV1_3, type ProofJwtPayload, type ResolveCredentialOfferOptions, type ResolveCredentialOfferOptionsAPTITUDE, type ResolveCredentialOfferOptionsV1_3, type ResolveCredentialOfferOptionsV1_4, type SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type ValidateCredentialOfferOptionsAPTITUDE, type ValidateCredentialOfferOptionsV1_3, type ValidateCredentialOfferOptionsV1_4, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofOptionsV1_4, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, type VerifyCredentialRequestJwtProofResultV1_4, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationCodeGrantV1_3, zAuthorizationCodeGrantV1_4, zAuthorizationResponse, zCredentialObject, zCredentialOfferGrantsV1_3, zCredentialOfferGrantsV1_4, zCredentialOfferV1_3, zCredentialOfferV1_4, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zMetadataResponseV1_4, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };