oobRequestPresentation function
Implementation
OutOfBandMessage oobRequestPresentation({
required PresentationDefinition presentationDefinition,
required String oobId,
required String threadId,
required List<String> replyTo,
required String issuerDid,
required String connectionDid,
required String challenge,
required String domain,
}) {
var request = RequestPresentation(
id: threadId,
threadId: threadId,
parentThreadId: threadId,
from: connectionDid,
replyTo: replyTo,
presentationDefinition: [
PresentationDefinitionWithOptions(
domain: domain,
challenge: challenge,
presentationDefinition: presentationDefinition,
)
]);
var oob = OutOfBandMessage(
id: oobId,
from: connectionDid,
threadId: threadId,
goalCode: 'streamlined-vp',
attachments: [Attachment(data: AttachmentData(json: request.toJson()))],
replyTo: replyTo);
return oob;
}