web5-js icon indicating copy to clipboard operation
web5-js copied to clipboard

Rename evaluationResults and it will share with the overloaded satisfiesPresentationDefinition

Open nitro-neal opened this issue 4 months ago • 0 comments

We will rename evaluationResults and it will share with the overloaded satisfiesPresentationDefinition. This will add more clarity to sdk api surface area.

Changing this:

const evaluationResults = PresentationExchange.evaluatePresentation({ presentationDefinition, presentation })

to this:

type WithPresentationDefinition = {
  vcJwts: string[];
  presentationDefinition: PresentationDefinitionV2;
};

type WithPresentationSubmission = {
  presentationSubmission: PresentationSubmission;
  presentationDefinition: PresentationDefinitionV2;
};

type SatisfiesPresentationOptions = WithPresentationDefinition | WithPresentationSubmission;

const result: ValidationResult  = PresentationExchange.satisfiesPresentationDefinition({ options: SatisfiesPresentationOptions })

nitro-neal avatar Feb 22 '24 23:02 nitro-neal