createPresentation

open suspend override fun createPresentation(challenge: String, audienceId: String, presentationDefinition: PresentationDefinition, fallbackFormatHolder: FormatHolder?, pathAuthorizationValidator: PathAuthorizationValidator?): KmmResult<Holder.PresentationResponseParameters>

Creates an array of VerifiablePresentation and a PresentationSubmission to match the presentationDefinition.

Fails in case the default submission is not a valid submission.

Parameters

fallbackFormatHolder

: format holder to be used in case there is no format holder in a given presentation definition and the input descriptor. This will mostly resolve to be the some clientMetadata.vpFormats

pathAuthorizationValidator

: Provides the user of this library with a way to enforce authorization rules.


open suspend override fun createPresentation(challenge: String, audienceId: String, presentationDefinitionId: String?, presentationSubmissionSelection: Map<String, CredentialSubmission>): KmmResult<Holder.PresentationResponseParameters>

Creates an array of VerifiablePresentation and a PresentationSubmission from already preselected presentationSubmissionSelection.

Assumptions:

  • the presentation submission selection is a valid submission regarding the submission requirements

Parameters

presentationDefinitionId

: id of the presentation definition this submission is intended for

presentationSubmissionSelection

: a selection of input descriptors by id and corresponding credentials along with a description of the fields to be disclosed