func (c *LD) RefreshRemoteProvider(request *models.RequestEnvelope) *models.ResponseEnvelope {
	args := ld.ProviderID{}
	if err := json.Unmarshal(request.Payload, &args); err != nil {
		return &models.ResponseEnvelope{Error: &models.CommandError{Message: err.Error()}}
	}
	response, cmdErr := exec(c.handlers[ld.RefreshRemoteProviderCommandMethod], args)
	if cmdErr != nil {
		return &models.ResponseEnvelope{Error: cmdErr}
	}
	return &models.ResponseEnvelope{Payload: response}
}
RefreshRemoteProvider updates contexts from the remote provider.
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"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command/ld"
)
type LD struct {
	handlers map[string]command.Exec
}
func (c *LD) AddContexts(request *models.RequestEnvelope) *models.ResponseEnvelope {
	args := ld.AddContextsRequest{}
	if err := json.Unmarshal(request.Payload, &args); err != nil {
		return &models.ResponseEnvelope{Error: &models.CommandError{Message: err.Error()}}
	}
	response, cmdErr := exec(c.handlers[ld.AddContextsCommandMethod], args)
	if cmdErr != nil {
		return &models.ResponseEnvelope{Error: cmdErr}
	}
	return &models.ResponseEnvelope{Payload: response}
}
func (c *LD) AddRemoteProvider(request *models.RequestEnvelope) *models.ResponseEnvelope {
	args := ld.AddRemoteProviderRequest{}
	if err := json.Unmarshal(request.Payload, &args); err != nil {
		return &models.ResponseEnvelope{Error: &models.CommandError{Message: err.Error()}}
	}
	response, cmdErr := exec(c.handlers[ld.AddRemoteProviderCommandMethod], args)
	if cmdErr != nil {
		return &models.ResponseEnvelope{Error: cmdErr}
	}
	return &models.ResponseEnvelope{Payload: response}
}