Credential response creation options, including version config, flow data, and optional encryption settings.
An object containing:
credentialResponse: plain version-specific credential response JSONcredentialResponseJwt: encrypted JWE string when encryption is requestedv1.0 - Immediate flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
credentials: [{ credential: "eyJ..." }],
notificationId: "notif-123",
},
});
// result.credentialResponse = { credentials: [{ credential: "eyJ..." }], notification_id: "notif-123" }
// result.credentialResponseJwt = undefined
v1.3 - Immediate flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
credentials: [{ credential: "eyJ..." }],
},
});
// result.credentialResponse contains plain JSON
// result.credentialResponseJwt contains encrypted JWE
v1.0 - Deferred flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
leadTime: 300,
transactionId: "tx-v1-0",
},
});
// result.credentialResponse = { lead_time: 300, transaction_id: "tx-v1-0" }
v1.3 - Deferred flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
interval: 60,
transactionId: "tx-v1-3",
},
});
// result.credentialResponse = { interval: 60, transaction_id: "tx-v1-3" }
// result.credentialResponseJwt contains encrypted JWE
Creates a credential response according to the configured Italian Wallet specification version.
Supports both immediate and deferred issuance flows, with optional JWE encryption of the generated response payload.
Version Differences:
lead_timeintervalcredentials, optional notification_id)Credential response creation options, including version config, flow data, and optional encryption settings.
An object containing:
credentialResponse: plain version-specific credential response JSONcredentialResponseJwt: encrypted JWE string when encryption is requestedv1.0 - Immediate flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
credentials: [{ credential: "eyJ..." }],
notificationId: "notif-123",
},
});
// result.credentialResponse = { credentials: [{ credential: "eyJ..." }], notification_id: "notif-123" }
// result.credentialResponseJwt = undefined
v1.3 - Immediate flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
credentials: [{ credential: "eyJ..." }],
},
});
// result.credentialResponse contains plain JSON
// result.credentialResponseJwt contains encrypted JWE
v1.0 - Deferred flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
leadTime: 300,
transactionId: "tx-v1-0",
},
});
// result.credentialResponse = { lead_time: 300, transaction_id: "tx-v1-0" }
v1.3 - Deferred flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
interval: 60,
transactionId: "tx-v1-3",
},
});
// result.credentialResponse = { interval: 60, transaction_id: "tx-v1-3" }
// result.credentialResponseJwt contains encrypted JWE
Creates a credential response according to the configured Italian Wallet specification version.
Supports both immediate and deferred issuance flows, with optional JWE encryption of the generated response payload.
Version Differences:
lead_timeintervalcredentials, optional notification_id)Credential response creation options, including version config, flow data, and optional encryption settings.
An object containing:
credentialResponse: plain version-specific credential response JSONcredentialResponseJwt: encrypted JWE string when encryption is requestedv1.0 - Immediate flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
credentials: [{ credential: "eyJ..." }],
notificationId: "notif-123",
},
});
// result.credentialResponse = { credentials: [{ credential: "eyJ..." }], notification_id: "notif-123" }
// result.credentialResponseJwt = undefined
v1.3 - Immediate flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
credentials: [{ credential: "eyJ..." }],
},
});
// result.credentialResponse contains plain JSON
// result.credentialResponseJwt contains encrypted JWE
v1.0 - Deferred flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
leadTime: 300,
transactionId: "tx-v1-0",
},
});
// result.credentialResponse = { lead_time: 300, transaction_id: "tx-v1-0" }
v1.3 - Deferred flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
interval: 60,
transactionId: "tx-v1-3",
},
});
// result.credentialResponse = { interval: 60, transaction_id: "tx-v1-3" }
// result.credentialResponseJwt contains encrypted JWE
Creates a credential response according to the configured Italian Wallet specification version.
Supports both immediate and deferred issuance flows, with optional JWE encryption of the generated response payload.
Version Differences:
lead_timeintervalcredentials, optional notification_id)Credential response creation options, including version config, flow data, and optional encryption settings.
An object containing:
credentialResponse: plain version-specific credential response JSONcredentialResponseJwt: encrypted JWE string when encryption is requestedv1.0 - Immediate flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
credentials: [{ credential: "eyJ..." }],
notificationId: "notif-123",
},
});
// result.credentialResponse = { credentials: [{ credential: "eyJ..." }], notification_id: "notif-123" }
// result.credentialResponseJwt = undefined
v1.3 - Immediate flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
credentials: [{ credential: "eyJ..." }],
},
});
// result.credentialResponse contains plain JSON
// result.credentialResponseJwt contains encrypted JWE
v1.0 - Deferred flow without encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const result = await createCredentialResponse({
config,
flow: {
leadTime: 300,
transactionId: "tx-v1-0",
},
});
// result.credentialResponse = { lead_time: 300, transaction_id: "tx-v1-0" }
v1.3 - Deferred flow with encryption
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const result = await createCredentialResponse({
callbacks: { encryptJwe: myEncryptJweCallback },
config,
credentialResponseEncryption: {
alg: "ECDH-ES",
enc: "A256GCM",
jwk: issuerEncryptionPublicJwk,
},
flow: {
interval: 60,
transactionId: "tx-v1-3",
},
});
// result.credentialResponse = { interval: 60, transaction_id: "tx-v1-3" }
// result.credentialResponseJwt contains encrypted JWE
Creates a credential response according to the configured Italian Wallet specification version.
Supports both immediate and deferred issuance flows, with optional JWE encryption of the generated response payload.
Version Differences:
lead_timeintervalcredentials, optionalnotification_id)