func WithAddProofFn(addProof func(presentation *verifiable.Presentation) error) Opt {
	return func(md *metaData) {
		md.addProofFn = addProof
	}
}
WithAddProofFn allows providing function that will sign the Presentation.
USAGE: This fn can be provided after receiving a Invitation message.
package presentproof
import (
	"encoding/json"
	"errors"
	"fmt"
	"strings"
	"github.com/google/uuid"
	"github.com/hyperledger/aries-framework-go/pkg/common/log"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/common/service"
	"github.com/hyperledger/aries-framework-go/pkg/doc/verifiable"
	"github.com/hyperledger/aries-framework-go/spi/storage"
)
const (
	Name = "present-proof"
	SpecV2 = "https://didcomm.org/present-proof/2.0/"
	ProposePresentationMsgTypeV2 = SpecV2 + "propose-presentation"
	RequestPresentationMsgTypeV2 = SpecV2 + "request-presentation"
	PresentationMsgTypeV2 = SpecV2 + "presentation"
	AckMsgTypeV2 = SpecV2 + "ack"
	ProblemReportMsgTypeV2 = SpecV2 + "problem-report"
	PresentationPreviewMsgTypeV2 = SpecV2 + "presentation-preview"
	SpecV3 = "https://didcomm.org/present-proof/3.0/"
	ProposePresentationMsgTypeV3 = SpecV3 + "propose-presentation"
	RequestPresentationMsgTypeV3 = SpecV3 + "request-presentation"
	PresentationMsgTypeV3 = SpecV3 + "presentation"
	AckMsgTypeV3 = SpecV3 + "ack"
	ProblemReportMsgTypeV3 = SpecV3 + "problem-report"
	PresentationPreviewMsgTypeV3 = SpecV3 + "presentation-preview"
)
const (
	internalDataKey        = "internal_data_"
	transitionalPayloadKey = "transitionalPayload_%s"
)
var (
	logger         = log.New("aries-framework/presentproof/service")
	initialHandler = HandlerFunc(func(_ Metadata) error {
		return nil
	})
	errProtocolStopped = errors.New("protocol was stopped")
)
type customError struct{ error }
type transitionalPayload struct {
	Action
	StateName   string
	AckRequired bool
	Direction   messageDirection
	Properties  map[string]interface{}
}
type messageDirection string
const (
	inboundMessage  = messageDirection("InboundMessage")
	outboundMessage = messageDirection("OutboundMessage")
)
type metaData struct {
	transitionalPayload
	state                 state
	presentationNames     []string
	properties            map[string]interface{}
	msgClone              service.DIDCommMsg
	presentation          *Presentation
	proposePresentation   *ProposePresentation
	request               *RequestPresentation
	presentationV3        *PresentationV3
	proposePresentationV3 *ProposePresentationV3
	requestV3             *RequestPresentationV3
	addProofFn func(presentation *verifiable.Presentation) error
	err error
}
func (md *metaData) Message() service.DIDCommMsg {
	return md.msgClone
}
func (md *metaData) Presentation() *Presentation {
	return md.presentation
}
func (md *metaData) PresentationV3() *PresentationV3 {
	return md.presentationV3
}
func (md *metaData) ProposePresentation() *ProposePresentation {
	return md.proposePresentation
}
func (md *metaData) ProposePresentationV3() *ProposePresentationV3 {
	return md.proposePresentationV3
}
func (md *metaData) RequestPresentation() *RequestPresentation {
	return md.request
}
func (md *metaData) RequestPresentationV3() *RequestPresentationV3 {
	return md.requestV3
}
func (md *metaData) PresentationNames() []string {
	return md.presentationNames
}
func (md *metaData) StateName() string {
	return md.state.Name()
}
func (md *metaData) Properties() map[string]interface{} {
	return md.properties
}
func (md *metaData) GetAddProofFn() func(presentation *verifiable.Presentation) error {
	return md.addProofFn
}
type Action struct {
	PIID     string
	Msg      service.DIDCommMsgMap
	MyDID    string
	TheirDID string
}
type Opt func(md *metaData)
func WithPresentation(msg *Presentation) Opt {
	return func(md *metaData) {
		md.presentation = msg
	}
}
func WithPresentationV3(msg *PresentationV3) Opt {
	return func(md *metaData) {
		md.presentationV3 = msg
	}
}