@pagopa/io-wallet-oid4vci 1.2.1 → 1.3.0

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
@@ -1,5 +1,5 @@
1
1
  import { CallbackContext, JwtSigner, JwtSignerJwk, verifyJwt, VerifyJwtCallback, JwtSignerX5c } from '@openid4vc/oauth2';
2
- import { decodeJwt, getJwtFromFormPost, CallbackContext as CallbackContext$1, verifyJwt as verifyJwt$1, V1_0, V1_3, Jwk } from '@pagopa/io-wallet-oauth2';
2
+ import { decodeJwt, getJwtFromFormPost, CallbackContext as CallbackContext$1, verifyJwt as verifyJwt$1, WalletAttestationOptionsV1_0, WalletAttestationOptionsV1_3, WalletAttestationOptionsV1_4, Jwk } from '@pagopa/io-wallet-oauth2';
3
3
  export { BaseWalletAttestationOptions } from '@pagopa/io-wallet-oauth2';
4
4
  import { FetchAuthorizationResponseOptions } from '@pagopa/io-wallet-oid4vp';
5
5
  import z, { z as z$1 } from 'zod';
@@ -490,7 +490,7 @@ declare const zCredentialRequestV1_3: z$1.ZodObject<{
490
490
  credential_identifier: z$1.ZodOptional<z$1.ZodString>;
491
491
  transaction_id: z$1.ZodOptional<z$1.ZodString>;
492
492
  proofs: z$1.ZodObject<{
493
- jwt: z$1.ZodArray<z$1.ZodString>;
493
+ jwt: z$1.ZodTuple<[z$1.ZodString], z$1.ZodString>;
494
494
  }, z$1.core.$strip>;
495
495
  }, z$1.core.$strip>;
496
496
  type CredentialRequestV1_3 = z$1.infer<typeof zCredentialRequestV1_3>;
@@ -781,10 +781,8 @@ declare const zKeyAttestationStatus: z$1.ZodObject<{
781
781
  }, z$1.core.$strip>;
782
782
  type KeyAttestationStatus = z$1.infer<typeof zKeyAttestationStatus>;
783
783
  /**
784
- * For the moment, these are all the supported algorithms in both
785
- * {@link https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/algorithms.html#cryptographic-algorithms|v1.3.3} and
786
- * {@link https://italia.github.io/eid-wallet-it-docs/releases/1.0.2/en/algorithms.html#cryptographic-algorithms|v1.0.2},
787
- * and in both specifications the `alg` field MUST be one of those values.
784
+ * For the moment, the specification doesn't restrict the key attestation signature algorithm
785
+ * to a subset of those that must/should be allowed
788
786
  */
789
787
  declare const zKeyAttestationAlg: z$1.ZodEnum<{
790
788
  ES256: "ES256";
@@ -1247,8 +1245,10 @@ declare function fetchCredentialResponse(options: FetchCredentialResponseOptions
1247
1245
  * Generic error thrown on Oid4vci operations
1248
1246
  */
1249
1247
  declare class Oid4vciError extends Error {
1250
- readonly statusCode?: number | undefined;
1251
- constructor(message: string, statusCode?: number | undefined);
1248
+ readonly statusCode?: number;
1249
+ constructor(message: string, options?: {
1250
+ statusCode?: number;
1251
+ } & ErrorOptions);
1252
1252
  }
1253
1253
  /**
1254
1254
  * Error thrown in case the DPoP key passed to the
@@ -1256,69 +1256,74 @@ declare class Oid4vciError extends Error {
1256
1256
  * doesn't contain a kid
1257
1257
  */
1258
1258
  declare class WalletProviderError extends Oid4vciError {
1259
- constructor(message: string, cause?: unknown);
1259
+ constructor(message: string, options?: ErrorOptions);
1260
1260
  }
1261
1261
  /**
1262
1262
  * Error thrown when an unexpected error occurs during nonce request.
1263
1263
  */
1264
1264
  declare class NonceRequestError extends Error {
1265
- readonly statusCode?: number | undefined;
1266
- constructor(message: string, statusCode?: number | undefined);
1265
+ readonly statusCode?: number;
1266
+ constructor(message: string, options?: {
1267
+ statusCode?: number;
1268
+ } & ErrorOptions);
1267
1269
  }
1268
1270
  /**
1269
1271
  * Error thrown when an unexpected error occurs during credential response fetching.
1270
1272
  */
1271
1273
  declare class FetchCredentialResponseError extends Oid4vciError {
1272
- constructor(message: string, cause?: unknown);
1274
+ constructor(message: string, options?: ErrorOptions);
1273
1275
  }
1274
1276
  /**
1275
1277
  * Error thrown when an unexpected error occurs during credential request parsing.
1276
1278
  */
1277
1279
  declare class ParseCredentialRequestError extends Oid4vciError {
1278
- constructor(message: string, cause?: unknown);
1280
+ constructor(message: string, options?: ErrorOptions);
1279
1281
  }
1280
1282
  /**
1281
1283
  * Error thrown when metadata fetching fails at all discovery endpoints.
1282
1284
  */
1283
1285
  declare class FetchMetadataError extends Oid4vciError {
1284
- constructor(message: string, cause?: unknown);
1286
+ constructor(message: string, options?: ErrorOptions);
1285
1287
  }
1286
1288
  /**
1287
1289
  * Error thrown when an unexpected error occurs during credential response creation.
1288
1290
  */
1289
1291
  declare class CreateCredentialResponseError extends Oid4vciError {
1290
- constructor(message: string, cause?: unknown);
1292
+ constructor(message: string, options?: ErrorOptions);
1291
1293
  }
1292
1294
  /**
1293
1295
  * Error thrown when an unexpected error occurs during credential request JWT proof verification.
1294
1296
  */
1295
1297
  declare class VerifyCredentialRequestJwtProofError extends Oid4vciError {
1296
- constructor(message: string, cause?: unknown);
1298
+ constructor(message: string, options?: ErrorOptions);
1297
1299
  }
1298
1300
  /**
1299
1301
  * Error thrown when an error occurs during key attestation JWT verification.
1300
1302
  */
1301
1303
  declare class VerifyKeyAttestationJwtError extends Oid4vciError {
1302
- constructor(message: string, cause?: unknown);
1304
+ constructor(message: string, options?: ErrorOptions);
1303
1305
  }
1304
1306
  /**
1305
1307
  * Error thrown when an error occurs during credential offer operations.
1306
1308
  * This includes parsing, resolving, validating, and extracting grant details from credential offers.
1307
1309
  */
1308
1310
  declare class CredentialOfferError extends Oid4vciError {
1309
- constructor(message: string, statusCode?: number);
1311
+ readonly statusCode?: number;
1312
+ constructor(message: string, options?: {
1313
+ statusCode?: number;
1314
+ } & ErrorOptions);
1310
1315
  }
1311
1316
  /**
1312
1317
  * Error thrown when a credential request is missing the required DPoP proof header.
1313
1318
  */
1314
1319
  declare class MissingDpopProofError extends Oid4vciError {
1315
- constructor(message?: string);
1320
+ constructor(message?: string, options?: ErrorOptions);
1316
1321
  }
1317
1322
  /**
1318
1323
  * Error thrown when a credential request has a missing or invalid Authorization header.
1319
1324
  */
1320
1325
  declare class CredentialAuthorizationHeaderError extends Oid4vciError {
1321
- constructor(message?: string);
1326
+ constructor(message?: string, options?: ErrorOptions);
1322
1327
  }
1323
1328
 
1324
1329
  declare const zMetadataResponseV1_0: z$1.ZodObject<{
@@ -9925,13 +9930,11 @@ interface FetchMetadataOptions {
9925
9930
  */
9926
9931
  declare function fetchMetadata(options: FetchMetadataOptions): Promise<MetadataResponse>;
9927
9932
 
9928
- type WalletAttestationOptionsV1_0 = V1_0.WalletAttestationOptionsV1_0;
9929
- type WalletAttestationOptionsV1_3 = V1_3.WalletAttestationOptionsV1_3;
9930
9933
  /**
9931
9934
  * Union type for wallet attestation options
9932
9935
  * Used by the version router
9933
9936
  */
9934
- type WalletAttestationOptions = WalletAttestationOptionsV1_0 | WalletAttestationOptionsV1_3;
9937
+ type WalletAttestationOptions = WalletAttestationOptionsV1_0 | WalletAttestationOptionsV1_3 | WalletAttestationOptionsV1_4;
9935
9938
 
9936
9939
  /**
9937
9940
  * @interface KeyAttestationOptions
@@ -10009,8 +10012,10 @@ declare class WalletProvider {
10009
10012
  * Creates a wallet attestation JWT according to the configured Italian Wallet specification version.
10010
10013
  *
10011
10014
  * Version Differences:
10012
- * - v1.0: Uses only `trust_chain` in header (federation method)
10013
- * - v1.3: Requires `x5c` in header, optional `trust_chain`, supports `nbf` and `status` claims
10015
+ * - v1.0: Uses only `trust_chain` in header (federation method); no `status` claim
10016
+ * - v1.3: Requires `x5c` in header, optional `trust_chain`; supports optional `nbf` and `status` claims
10017
+ * - v1.4: Requires `x5c` in header, optional `trust_chain`; `status`, `wallet_link`, and `wallet_name`
10018
+ * are all **required**; optional `eudi_wallet_info` claim; sets `sub` to `dpopJwkPublic.kid`
10014
10019
  *
10015
10020
  * @public
10016
10021
  * @async
@@ -10045,8 +10050,33 @@ declare class WalletProvider {
10045
10050
  * nbf: new Date('2025-01-01'), // Optional
10046
10051
  * status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
10047
10052
  * });
10053
+ *
10054
+ * @example v1.4 - Wallet attestation with required status and optional eudi_wallet_info
10055
+ * const jwt = await provider.createItWalletAttestationJwt({
10056
+ * callbacks: { signJwt: mySignJwtCallback },
10057
+ * dpopJwkPublic: myJwk,
10058
+ * issuer: "https://wallet-provider.example.com",
10059
+ * signer: {
10060
+ * alg: "ES256",
10061
+ * kid: "provider-key-id",
10062
+ * method: "x5c",
10063
+ * x5c: ["cert1-base64", "cert2-base64"],
10064
+ * trustChain: ["trust-anchor-jwt"] // Optional
10065
+ * },
10066
+ * status: { status_list: { idx: 2, uri: "https://status.example.com" } }, // Required
10067
+ * walletLink: "https://wallet.example.com", // Required
10068
+ * walletName: "My Wallet", // Required
10069
+ * eudiWalletInfo: { // Optional
10070
+ * general_info: {
10071
+ * wallet_provider_name: "PagoPA",
10072
+ * wallet_solution_certification_information: "certification-ref",
10073
+ * wallet_solution_id: "wallet-solution-id",
10074
+ * wallet_solution_version: "1.0.0"
10075
+ * }
10076
+ * }
10077
+ * });
10048
10078
  */
10049
10079
  createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
10050
10080
  }
10051
10081
 
10052
- export { type AuthorizationCodeGrant, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferUri, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, 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 ExtractGrantDetailsResult, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, 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 SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, type WalletAttestationOptionsV1_0, type WalletAttestationOptionsV1_3, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationResponse, zCredentialObject, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
10082
+ export { type AuthorizationCodeGrant, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferUri, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, 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 ExtractGrantDetailsResult, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, 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 SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, 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, zAuthorizationResponse, zCredentialObject, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CallbackContext, JwtSigner, JwtSignerJwk, verifyJwt, VerifyJwtCallback, JwtSignerX5c } from '@openid4vc/oauth2';
2
- import { decodeJwt, getJwtFromFormPost, CallbackContext as CallbackContext$1, verifyJwt as verifyJwt$1, V1_0, V1_3, Jwk } from '@pagopa/io-wallet-oauth2';
2
+ import { decodeJwt, getJwtFromFormPost, CallbackContext as CallbackContext$1, verifyJwt as verifyJwt$1, WalletAttestationOptionsV1_0, WalletAttestationOptionsV1_3, WalletAttestationOptionsV1_4, Jwk } from '@pagopa/io-wallet-oauth2';
3
3
  export { BaseWalletAttestationOptions } from '@pagopa/io-wallet-oauth2';
4
4
  import { FetchAuthorizationResponseOptions } from '@pagopa/io-wallet-oid4vp';
5
5
  import z, { z as z$1 } from 'zod';
@@ -490,7 +490,7 @@ declare const zCredentialRequestV1_3: z$1.ZodObject<{
490
490
  credential_identifier: z$1.ZodOptional<z$1.ZodString>;
491
491
  transaction_id: z$1.ZodOptional<z$1.ZodString>;
492
492
  proofs: z$1.ZodObject<{
493
- jwt: z$1.ZodArray<z$1.ZodString>;
493
+ jwt: z$1.ZodTuple<[z$1.ZodString], z$1.ZodString>;
494
494
  }, z$1.core.$strip>;
495
495
  }, z$1.core.$strip>;
496
496
  type CredentialRequestV1_3 = z$1.infer<typeof zCredentialRequestV1_3>;
@@ -781,10 +781,8 @@ declare const zKeyAttestationStatus: z$1.ZodObject<{
781
781
  }, z$1.core.$strip>;
782
782
  type KeyAttestationStatus = z$1.infer<typeof zKeyAttestationStatus>;
783
783
  /**
784
- * For the moment, these are all the supported algorithms in both
785
- * {@link https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/algorithms.html#cryptographic-algorithms|v1.3.3} and
786
- * {@link https://italia.github.io/eid-wallet-it-docs/releases/1.0.2/en/algorithms.html#cryptographic-algorithms|v1.0.2},
787
- * and in both specifications the `alg` field MUST be one of those values.
784
+ * For the moment, the specification doesn't restrict the key attestation signature algorithm
785
+ * to a subset of those that must/should be allowed
788
786
  */
789
787
  declare const zKeyAttestationAlg: z$1.ZodEnum<{
790
788
  ES256: "ES256";
@@ -1247,8 +1245,10 @@ declare function fetchCredentialResponse(options: FetchCredentialResponseOptions
1247
1245
  * Generic error thrown on Oid4vci operations
1248
1246
  */
1249
1247
  declare class Oid4vciError extends Error {
1250
- readonly statusCode?: number | undefined;
1251
- constructor(message: string, statusCode?: number | undefined);
1248
+ readonly statusCode?: number;
1249
+ constructor(message: string, options?: {
1250
+ statusCode?: number;
1251
+ } & ErrorOptions);
1252
1252
  }
1253
1253
  /**
1254
1254
  * Error thrown in case the DPoP key passed to the
@@ -1256,69 +1256,74 @@ declare class Oid4vciError extends Error {
1256
1256
  * doesn't contain a kid
1257
1257
  */
1258
1258
  declare class WalletProviderError extends Oid4vciError {
1259
- constructor(message: string, cause?: unknown);
1259
+ constructor(message: string, options?: ErrorOptions);
1260
1260
  }
1261
1261
  /**
1262
1262
  * Error thrown when an unexpected error occurs during nonce request.
1263
1263
  */
1264
1264
  declare class NonceRequestError extends Error {
1265
- readonly statusCode?: number | undefined;
1266
- constructor(message: string, statusCode?: number | undefined);
1265
+ readonly statusCode?: number;
1266
+ constructor(message: string, options?: {
1267
+ statusCode?: number;
1268
+ } & ErrorOptions);
1267
1269
  }
1268
1270
  /**
1269
1271
  * Error thrown when an unexpected error occurs during credential response fetching.
1270
1272
  */
1271
1273
  declare class FetchCredentialResponseError extends Oid4vciError {
1272
- constructor(message: string, cause?: unknown);
1274
+ constructor(message: string, options?: ErrorOptions);
1273
1275
  }
1274
1276
  /**
1275
1277
  * Error thrown when an unexpected error occurs during credential request parsing.
1276
1278
  */
1277
1279
  declare class ParseCredentialRequestError extends Oid4vciError {
1278
- constructor(message: string, cause?: unknown);
1280
+ constructor(message: string, options?: ErrorOptions);
1279
1281
  }
1280
1282
  /**
1281
1283
  * Error thrown when metadata fetching fails at all discovery endpoints.
1282
1284
  */
1283
1285
  declare class FetchMetadataError extends Oid4vciError {
1284
- constructor(message: string, cause?: unknown);
1286
+ constructor(message: string, options?: ErrorOptions);
1285
1287
  }
1286
1288
  /**
1287
1289
  * Error thrown when an unexpected error occurs during credential response creation.
1288
1290
  */
1289
1291
  declare class CreateCredentialResponseError extends Oid4vciError {
1290
- constructor(message: string, cause?: unknown);
1292
+ constructor(message: string, options?: ErrorOptions);
1291
1293
  }
1292
1294
  /**
1293
1295
  * Error thrown when an unexpected error occurs during credential request JWT proof verification.
1294
1296
  */
1295
1297
  declare class VerifyCredentialRequestJwtProofError extends Oid4vciError {
1296
- constructor(message: string, cause?: unknown);
1298
+ constructor(message: string, options?: ErrorOptions);
1297
1299
  }
1298
1300
  /**
1299
1301
  * Error thrown when an error occurs during key attestation JWT verification.
1300
1302
  */
1301
1303
  declare class VerifyKeyAttestationJwtError extends Oid4vciError {
1302
- constructor(message: string, cause?: unknown);
1304
+ constructor(message: string, options?: ErrorOptions);
1303
1305
  }
1304
1306
  /**
1305
1307
  * Error thrown when an error occurs during credential offer operations.
1306
1308
  * This includes parsing, resolving, validating, and extracting grant details from credential offers.
1307
1309
  */
1308
1310
  declare class CredentialOfferError extends Oid4vciError {
1309
- constructor(message: string, statusCode?: number);
1311
+ readonly statusCode?: number;
1312
+ constructor(message: string, options?: {
1313
+ statusCode?: number;
1314
+ } & ErrorOptions);
1310
1315
  }
1311
1316
  /**
1312
1317
  * Error thrown when a credential request is missing the required DPoP proof header.
1313
1318
  */
1314
1319
  declare class MissingDpopProofError extends Oid4vciError {
1315
- constructor(message?: string);
1320
+ constructor(message?: string, options?: ErrorOptions);
1316
1321
  }
1317
1322
  /**
1318
1323
  * Error thrown when a credential request has a missing or invalid Authorization header.
1319
1324
  */
1320
1325
  declare class CredentialAuthorizationHeaderError extends Oid4vciError {
1321
- constructor(message?: string);
1326
+ constructor(message?: string, options?: ErrorOptions);
1322
1327
  }
1323
1328
 
1324
1329
  declare const zMetadataResponseV1_0: z$1.ZodObject<{
@@ -9925,13 +9930,11 @@ interface FetchMetadataOptions {
9925
9930
  */
9926
9931
  declare function fetchMetadata(options: FetchMetadataOptions): Promise<MetadataResponse>;
9927
9932
 
9928
- type WalletAttestationOptionsV1_0 = V1_0.WalletAttestationOptionsV1_0;
9929
- type WalletAttestationOptionsV1_3 = V1_3.WalletAttestationOptionsV1_3;
9930
9933
  /**
9931
9934
  * Union type for wallet attestation options
9932
9935
  * Used by the version router
9933
9936
  */
9934
- type WalletAttestationOptions = WalletAttestationOptionsV1_0 | WalletAttestationOptionsV1_3;
9937
+ type WalletAttestationOptions = WalletAttestationOptionsV1_0 | WalletAttestationOptionsV1_3 | WalletAttestationOptionsV1_4;
9935
9938
 
9936
9939
  /**
9937
9940
  * @interface KeyAttestationOptions
@@ -10009,8 +10012,10 @@ declare class WalletProvider {
10009
10012
  * Creates a wallet attestation JWT according to the configured Italian Wallet specification version.
10010
10013
  *
10011
10014
  * Version Differences:
10012
- * - v1.0: Uses only `trust_chain` in header (federation method)
10013
- * - v1.3: Requires `x5c` in header, optional `trust_chain`, supports `nbf` and `status` claims
10015
+ * - v1.0: Uses only `trust_chain` in header (federation method); no `status` claim
10016
+ * - v1.3: Requires `x5c` in header, optional `trust_chain`; supports optional `nbf` and `status` claims
10017
+ * - v1.4: Requires `x5c` in header, optional `trust_chain`; `status`, `wallet_link`, and `wallet_name`
10018
+ * are all **required**; optional `eudi_wallet_info` claim; sets `sub` to `dpopJwkPublic.kid`
10014
10019
  *
10015
10020
  * @public
10016
10021
  * @async
@@ -10045,8 +10050,33 @@ declare class WalletProvider {
10045
10050
  * nbf: new Date('2025-01-01'), // Optional
10046
10051
  * status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
10047
10052
  * });
10053
+ *
10054
+ * @example v1.4 - Wallet attestation with required status and optional eudi_wallet_info
10055
+ * const jwt = await provider.createItWalletAttestationJwt({
10056
+ * callbacks: { signJwt: mySignJwtCallback },
10057
+ * dpopJwkPublic: myJwk,
10058
+ * issuer: "https://wallet-provider.example.com",
10059
+ * signer: {
10060
+ * alg: "ES256",
10061
+ * kid: "provider-key-id",
10062
+ * method: "x5c",
10063
+ * x5c: ["cert1-base64", "cert2-base64"],
10064
+ * trustChain: ["trust-anchor-jwt"] // Optional
10065
+ * },
10066
+ * status: { status_list: { idx: 2, uri: "https://status.example.com" } }, // Required
10067
+ * walletLink: "https://wallet.example.com", // Required
10068
+ * walletName: "My Wallet", // Required
10069
+ * eudiWalletInfo: { // Optional
10070
+ * general_info: {
10071
+ * wallet_provider_name: "PagoPA",
10072
+ * wallet_solution_certification_information: "certification-ref",
10073
+ * wallet_solution_id: "wallet-solution-id",
10074
+ * wallet_solution_version: "1.0.0"
10075
+ * }
10076
+ * }
10077
+ * });
10048
10078
  */
10049
10079
  createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
10050
10080
  }
10051
10081
 
10052
- export { type AuthorizationCodeGrant, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferUri, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, 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 ExtractGrantDetailsResult, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, 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 SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, VerifyKeyAttestationJwtError, type VerifyKeyAttestationJwtOptions, type VerifyKeyAttestationJwtResult, type WalletAttestationOptions, type WalletAttestationOptionsV1_0, type WalletAttestationOptionsV1_3, WalletProvider, WalletProviderError, completeAuthorization, createCredentialRequest, createCredentialResponse, extractGrantDetails, fetchCredentialResponse, fetchMetadata, keyAttestationTypeHeader, parseCredentialOfferUri, parseCredentialRequest, resolveCredentialOffer, sendAuthorizationResponseAndExtractCode, validateCredentialOffer, verifyAuthorizationResponse, verifyAuthorizationResponseFormPostJWT, verifyCredentialRequestJwtProof, verifyKeyAttestationJwt, zAuthorizationResponse, zCredentialObject, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };
10082
+ export { type AuthorizationCodeGrant, type AuthorizationResponse, type BaseCredentialRequestOptions, type CompleteAuthorizationOptions, type CompleteAuthorizationResult, CreateCredentialResponseError, type CreateCredentialResponseOptions, type CreateCredentialResponseOptionsV1_0, type CreateCredentialResponseOptionsV1_3, type CreateCredentialResponseResult, type CreateCredentialResponseResultWithFlow, CredentialAuthorizationHeaderError, type CredentialObject, type CredentialOffer, CredentialOfferError, type CredentialOfferGrants, type CredentialOfferUri, type CredentialRequest, type CredentialRequestOptions, type CredentialRequestOptionsV1_0, type CredentialRequestOptionsV1_3, 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 ExtractGrantDetailsResult, FetchCredentialResponseError, type FetchCredentialResponseOptions, FetchMetadataError, type FetchMetadataOptions, type FetchStatusListCallback, type ImmediateCredentialResponse, type ImmediateFlowOptions, type KeyAttestationHeader, type KeyAttestationOptions, type KeyAttestationPayload, type KeyAttestationStatus, type MetadataResponse, type MetadataResponseV1_0, type MetadataResponseV1_3, 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 SendAuthorizationResponseAndExtractCodeOptions, type StatusList, type ValidateCredentialOfferOptions, type VerifyAuthorizationResponseFormPostJWTOptions, type VerifyAuthorizationResponseOptions, type VerifyCredentialRequestJwtProofBaseOptions, VerifyCredentialRequestJwtProofError, type VerifyCredentialRequestJwtProofOptions, type VerifyCredentialRequestJwtProofOptionsV1_0, type VerifyCredentialRequestJwtProofOptionsV1_3, type VerifyCredentialRequestJwtProofResult, type VerifyCredentialRequestJwtProofResultV1_0, type VerifyCredentialRequestJwtProofResultV1_3, 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, zAuthorizationResponse, zCredentialObject, zCredentialRequestV1_0, zCredentialRequestV1_3, zCredentialResponseEncryption, zCredentialResponseV1_0, zCredentialResponseV1_3, zDeferredCredentialResponseV1_0, zDeferredCredentialResponseV1_3, zImmediateCredentialResponse, zKeyAttestationAlg, zKeyAttestationHeader, zKeyAttestationPayload, zKeyAttestationStatus, zKeyAttestationTypeHeader, zMetadataResponse, zMetadataResponseV1_0, zMetadataResponseV1_3, zProofJwtHeaderV1_0, zProofJwtHeaderV1_3, zProofJwtPayload, zStatusList };