generateRequestCredentialMessageFromOffer function

RequestCredential generateRequestCredentialMessageFromOffer({
  1. required OfferCredential offer,
  2. required List<String> replyTo,
  3. required WalletStore wallet,
})

Response from the holder for a offer credential message

Implementation

RequestCredential generateRequestCredentialMessageFromOffer({
  required OfferCredential offer,
  required List<String> replyTo,
  required WalletStore wallet,
}) {
  var message = RequestCredential(
      detail: [
        LdProofVcDetail(
            credential: offer.detail!.first.credential,
            options: LdProofVcDetailOptions(
                proofType: offer.detail!.first.options.proofType,
                challenge: const Uuid().v4()))
      ],
      replyTo: replyTo,
      threadId: offer.threadId ?? offer.id,
      from: getConversationDid(offer, wallet),
      to: [offer.from!]);

  return message;
}