// RequestDiscovery requests did discovery.
RequestDiscovery requests did discovery.
// RequestDiscovery requests did discovery .
func (d *Discovery) RequestDiscovery(did string) error {
	suffix, err := util.GetSuffix(did)
	if err != nil {
		return err
	}
	latestCID, err := d.discoverLatestCID(did)
	if err != nil {
		logger.Warnf("failed to discover latest CID for did[%s]: %w", did, err)
		latestCID, err = d.getCID(did, suffix)
		if err != nil {
			return err
		}
	}
	return d.publisher.PublishDID(latestCID + docutil.NamespaceDelimiter + suffix)
}
func ( d * Discovery ) RequestDiscovery ( did string ) error { suffix , err := util . GetSuffix ( did ) if err != nil { return err } latestCID , err := d . discoverLatestCID ( did ) if err != nil { logger . Warnf ( " " , did , err ) latestCID , err = d . getCID ( did , suffix ) if err != nil { return err } } return d . publisher . PublishDID ( latestCID + docutil . NamespaceDelimiter + suffix ) }
RequestDiscovery requests did discovery.
RequestDiscovery requests did discovery .