func NewProvider(providers *providers, sidetreeConfigProvider sidetreeConfigProvider) *Provider {
	logger.Info("Creating Sidetree services provider")
	return &Provider{
		providers:              providers,
		sidetreeConfigProvider: sidetreeConfigProvider,
		chanControllers:        make(map[string]*channelController),
	}
}
NewProvider returns a new Sidetree services provider
package sidetreesvc
import (
	"fmt"
	"sync"
	"github.com/hyperledger/fabric/common/flogging"
	ledgerconfig "github.com/trustbloc/fabric-peer-ext/pkg/config/ledgerconfig/config"
	"github.com/trustbloc/sidetree-core-go/pkg/restapi/common"
	"github.com/trustbloc/sidetree-fabric/pkg/config"
	ctxcommon "github.com/trustbloc/sidetree-fabric/pkg/context/common"
	"github.com/trustbloc/sidetree-fabric/pkg/observer"
	"github.com/trustbloc/sidetree-fabric/pkg/peer/discovery"
)
var logger = flogging.MustGetLogger("sidetree_peer")
type configServiceProvider interface {
	ForChannel(channelID string) ledgerconfig.Service
}
type peerConfig interface {
	PeerID() string
	PeerAddress() string
	MSPID() string
}
type restConfig interface {
	SidetreeListenURL() (string, error)
	SidetreeListenPort() int
	SidetreeTLSCertificate() string
	SidetreeTLSKey() string
	SidetreeAPIToken(name string) string
}
type sidetreeConfigProvider interface {
	ForChannel(channelID string) config.SidetreeService
}
type discoveryProvider interface {
	UpdateLocalServicesForChannel(channelID string, services []discovery.Service)
	ServicesForChannel(channelID string) []discovery.Service
}
type providers struct {
	*ContextProviders
	PeerConfig        peerConfig
	RESTConfig        restConfig
	ConfigProvider    configServiceProvider
	ObserverProviders *observer.ClientProviders
	BlockPublisher    ctxcommon.BlockPublisherProvider
	DiscoveryProvider discoveryProvider
}
type Provider struct {
	*providers
	sidetreeConfigProvider sidetreeConfigProvider
	restService            *restService
	chanControllers        map[string]*channelController
	mutex                  sync.RWMutex
}