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
VpDecorator
instance and use it to create aVerifiablePresentation
:
- TypeScript
- Java
const vpDecoratorInstance = await client.createVpDecorator(); // VpDecorator
VpDecorator vpDecoratorInstance = new VpDecorator(client);
- Call the
issue
method to issue a new verifiable presentation and return its representation (aVerifiablePresentation
instance).
- 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:
VerifiableCredential
CredentialResource
idsCredentialResource
UnknownVerifiableCredential
Further reading
After presentation issuance, you can do the following: