func (e *EndpointService) Resolve(party view.Identity) (view.Identity, map[PortName]string, []byte, error) {
	id, ports, raw, err := e.es.Resolve(party)
	if err != nil {
		return nil, nil, nil, err
	}
	logger.Debugf("resolved [%s] to [%s] with ports [%v]", party, id, ports)
	out := map[PortName]string{}
	for name, s := range ports {
		out[PortName(name)] = s
	}
	return id, out, raw, nil
}
Resolve returns the endpoints of the passed identity.
If the passed identity does not have any endpoint set, the service checks
if the passed identity is bound to another identity that is returned together with its endpoints and public-key identifier.
package view
import (
	"github.com/pkg/errors"
	"github.com/hyperledger-labs/fabric-smart-client/platform/view/driver"
	"github.com/hyperledger-labs/fabric-smart-client/platform/view/services/flogging"
	"github.com/hyperledger-labs/fabric-smart-client/platform/view/view"
)
var logger = flogging.MustGetLogger("view-sdk")
type PortName string
const (
	ListenPort PortName = "Listen"
	ViewPort PortName = "View"
	P2PPort PortName = "P2P"
)
type PKIResolver interface {
	GetPKIidOfCert(peerIdentity view.Identity) []byte
}
type EndpointService struct {
	es driver.EndpointService
}
func (e *EndpointService) Endpoint(party view.Identity) (map[PortName]string, error) {
	res, err := e.es.Endpoint(party)
	if err != nil {
		return nil, err
	}
	out := map[PortName]string{}
	for name, s := range res {
		out[PortName(name)] = s
	}
	return out, nil
}