Request options including version config
Version-specific credential request object
v1.0 - Basic credential request
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const request = await createCredentialRequest({
config,
callbacks: { signJwt: mySignJwtCallback },
clientId: "my-client-id",
credential_identifier: "UniversityDegree",
issuerIdentifier: "https://issuer.example.com",
nonce: "c_nonce_value",
signer: myJwtSigner
});
// Returns: { credential_identifier: "...", proof: { jwt: "...", proof_type: "jwt" } }
v1.3 - Credential request with key attestation
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const request = await createCredentialRequest({
config,
callbacks: { signJwt: mySignJwtCallback, hash: myHashCallback },
clientId: "my-client-id",
credential_identifier: "education_degree_unibo_2017_l31_informatica",
issuerIdentifier: "https://issuer.example.com",
keyAttestation: 'eyJ...', // Required for v1.3
nonce: "c_nonce_value",
signers: [myJwtSigner]
});
// Returns: { credential_identifier: "...", proofs: { jwt: ["..."] } }
Creates a credential request according to the configured Italian Wallet specification version.
Version Differences:
proof object with explicit proof_type fieldproofs object with JWT array (batch support) and requires key attestationRequest options including version config
Version-specific credential request object
v1.0 - Basic credential request
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_0 });
const request = await createCredentialRequest({
config,
callbacks: { signJwt: mySignJwtCallback },
clientId: "my-client-id",
credential_identifier: "UniversityDegree",
issuerIdentifier: "https://issuer.example.com",
nonce: "c_nonce_value",
signer: myJwtSigner
});
// Returns: { credential_identifier: "...", proof: { jwt: "...", proof_type: "jwt" } }
v1.3 - Credential request with key attestation
const config = new IoWalletSdkConfig({ itWalletSpecsVersion: ItWalletSpecsVersion.V1_3 });
const request = await createCredentialRequest({
config,
callbacks: { signJwt: mySignJwtCallback, hash: myHashCallback },
clientId: "my-client-id",
credential_identifier: "education_degree_unibo_2017_l31_informatica",
issuerIdentifier: "https://issuer.example.com",
keyAttestation: 'eyJ...', // Required for v1.3
nonce: "c_nonce_value",
signers: [myJwtSigner]
});
// Returns: { credential_identifier: "...", proofs: { jwt: ["..."] } }
Creates a credential request according to the configured Italian Wallet specification version.
Version Differences:
proofobject with explicitproof_typefieldproofsobject with JWT array (batch support) and requires key attestation