func (v *VDR) SaveDID(request *models.RequestEnvelope) *models.ResponseEnvelope {
	args := cmdvdr.DIDArgs{}
	if err := json.Unmarshal(request.Payload, &args); err != nil {
		return &models.ResponseEnvelope{Error: &models.CommandError{Message: err.Error()}}
	}
	response, cmdErr := exec(v.handlers[cmdvdr.SaveDIDCommandMethod], args)
	if cmdErr != nil {
		return &models.ResponseEnvelope{Error: cmdErr}
	}
	return &models.ResponseEnvelope{Payload: response}
}
SaveDID saves the did doc to the store.
package command
import (
	"encoding/json"
	"github.com/hyperledger/aries-framework-go/cmd/aries-agent-mobile/pkg/wrappers/models"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command"
	cmdvdr "github.com/hyperledger/aries-framework-go/pkg/controller/command/vdr"
)
type VDR struct {
	handlers map[string]command.Exec
}
func (v *VDR) ResolveDID(request *models.RequestEnvelope) *models.ResponseEnvelope {
	args := cmdvdr.IDArg{}
	if err := json.Unmarshal(request.Payload, &args); err != nil {
		return &models.ResponseEnvelope{Error: &models.CommandError{Message: err.Error()}}
	}
	response, cmdErr := exec(v.handlers[cmdvdr.ResolveDIDCommandMethod], args)
	if cmdErr != nil {
		return &models.ResponseEnvelope{Error: cmdErr}
	}
	return &models.ResponseEnvelope{Payload: response}
}
func (v *VDR) CreateDID(request *models.RequestEnvelope) *models.ResponseEnvelope {
	args := cmdvdr.CreateDIDRequest{}
	if err := json.Unmarshal(request.Payload, &args); err != nil {
		return &models.ResponseEnvelope{Error: &models.CommandError{Message: err.Error()}}
	}
	response, cmdErr := exec(v.handlers[cmdvdr.CreateDIDCommandMethod], args)
	if cmdErr != nil {
		return &models.ResponseEnvelope{Error: cmdErr}
	}
	return &models.ResponseEnvelope{Payload: response}
}