Issue presentation
Verifiable presentations allow holders to share selected information from their verifiable credentials with a verifier. A presentation can bundle multiple credentials and uses cryptographic proofs to ensure authenticity and integrity.
Prerequisites
Create and issue a verifiable presentation
To issue a verifiable presentation that contains multiple credentials, follow the steps below:
- Initialize the
VpDecoratorinstance and use it to create aVerifiablePresentation:
- TypeScript
- Java
const vpDecoratorInstance = await client.createVpDecorator(); // VpDecorator
VpDecorator vpDecoratorInstance = new VpDecorator(client);
- Call the
issuemethod to issue a new verifiable presentation and return its representation (aVerifiablePresentationinstance).
- TypeScript
- Java
const presentation = await vpDecoratorInstance.issue([credential, credential2], privateKey.id); // VerifiablePresentation
VerifiablePresentation presentation = vpDecoratorInstance
.issue(List.of(credentialId1, credentialId1), privateKey.getId());
You can pass the following arrays to the issue method:
VerifiableCredentialCredentialResourceidsCredentialResourceUnknownVerifiableCredential
Further reading
After presentation issuance, you can do the following: