func New(ctx presentproof.Provider, notifier command.Notifier) (*Command, error) {
	client, err := presentproof.New(ctx)
	if err != nil {
		return nil, fmt.Errorf("cannot create a client: %w", err)
	}
	actions := make(chan service.DIDCommAction)
	if err := client.RegisterActionEvent(actions); err != nil {
		return nil, fmt.Errorf("register action event: %w", err)
	}
	states := make(chan service.StateMsg)
	if err := client.RegisterMsgEvent(states); err != nil {
		return nil, fmt.Errorf("register msg event: %w", err)
	}
	obs := webnotifier.NewObserver(notifier)
	obs.RegisterAction(protocol.Name+_actions, actions)
	obs.RegisterStateMsg(protocol.Name+_states, states)
	return &Command{client: client}, nil
}
New returns new present proof controller command instance.
package presentproof
import (
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"github.com/hyperledger/aries-framework-go/pkg/client/presentproof"
	"github.com/hyperledger/aries-framework-go/pkg/common/log"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command"
	"github.com/hyperledger/aries-framework-go/pkg/controller/internal/cmdutil"
	"github.com/hyperledger/aries-framework-go/pkg/controller/webnotifier"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/common/service"
	protocol "github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/presentproof"
	"github.com/hyperledger/aries-framework-go/pkg/internal/logutil"
)
const (
	InvalidRequestErrorCode = command.Code(iota + command.PresentProof)
	ActionsErrorCode
	SendRequestPresentationErrorCode
	AcceptRequestPresentationErrorCode
	AcceptProblemReportErrorCode
	NegotiateRequestPresentationErrorCode
	DeclineRequestPresentationErrorCode
	SendProposePresentationErrorCode
	AcceptProposePresentationErrorCode
	DeclineProposePresentationErrorCode
	AcceptPresentationErrorCode
	DeclinePresentationErrorCode
)
const (
	CommandName = "presentproof"
	Actions                        = "Actions"
	SendRequestPresentation        = "SendRequestPresentation"
	SendRequestPresentationV3      = "SendRequestPresentationV3"
	AcceptRequestPresentation      = "AcceptRequestPresentation"
	AcceptRequestPresentationV3    = "AcceptRequestPresentationV3"
	NegotiateRequestPresentation   = "NegotiateRequestPresentation"
	NegotiateRequestPresentationV3 = "NegotiateRequestPresentationV3"
	AcceptProblemReport            = "AcceptProblemReport"
	DeclineRequestPresentation     = "DeclineRequestPresentation"
	SendProposePresentation        = "SendProposePresentation"
	SendProposePresentationV3      = "SendProposePresentationV3"
	AcceptProposePresentation      = "AcceptProposePresentation"
	AcceptProposePresentationV3    = "AcceptProposePresentationV3"
	DeclineProposePresentation     = "DeclineProposePresentation"
	AcceptPresentation             = "AcceptPresentation"
	DeclinePresentation            = "DeclinePresentation"
)
const (
	errEmptyPIID                = "empty PIID"
	errEmptyMyDID               = "empty MyDID"
	errEmptyTheirDID            = "empty TheirDID"
	errEmptyPresentation        = "empty Presentation"
	errEmptyProposePresentation = "empty ProposePresentation"
	errEmptyRequestPresentation = "empty RequestPresentation"
	successString = "success"
	_actions = "_actions"
	_states  = "_states"
)
var logger = log.New("aries-framework/controller/presentproof")
type Command struct {
	client *presentproof.Client
}