Presentations

Presentations Management

1. Send a Presentation

To send a presentation to another profile, use the sendPresentation method. This method accepts a profileId, a vp object, and an optional encrypt parameter.

const profileId = 'janesmith';
const vp = your_presentation;
const encrypt = true;

await learnCard.invoke.sendPresentation(profileId, vp, encrypt);

2. Accept a Presentation

To accept a presentation, use the acceptPresentation method. This method accepts a uri parameter.

const uri = 'your_presentation_uri';

await learnCard.invoke.acceptPresentation(uri);

3. Get Received Presentations

To retrieve all received presentations, use the getReceivedPresentations method. This method accepts an optional from parameter.

const from = 'johnsmith';

await learnCard.invoke.getReceivedPresentations(from);

4. Get Sent Presentations

To retrieve all sent presentations, use the getSentPresentations method. This method accepts an optional to parameter.

const to = 'janesmith';

await learnCard.invoke.getSentPresentations(to);

5. Get Incoming Presentations

To retrieve all incoming presentations, use the getIncomingPresentations method. This method accepts an optional from parameter.

const from = 'johnsmith';

await learnCard.invoke.getIncomingPresentations(from);

6. Delete a Presentation

To delete a presentation, use the deletePresentation method. This method accepts a uri parameter.

const uri = 'your_presentation_uri';

await learnCard.invoke.deletePresentation(uri);

Last updated