// GetAnchorInfo returns anchor information about the given DID.
GetAnchorInfo returns anchor information about the given DID.
// GetAnchorInfo returns anchor information about the given DID .
func (r *AnchorInfoRetriever) GetAnchorInfo(did string) (*AnchorInfo, error) {
	metadata, err := r.resourceRegistry.GetResourceInfo(did)
	if err != nil {
		return nil, fmt.Errorf("get info for DID [%s]: %w", did, err)
	}
	info := &AnchorInfo{}
	info.AnchorOrigin, err = r.getProperty(registry.AnchorOriginProperty, metadata, true)
	if err != nil {
		return nil, fmt.Errorf("get anchor origin for DID [%s]: %w", did, err)
	}
	info.AnchorURI, err = r.getProperty(registry.AnchorURIProperty, metadata, true)
	if err != nil {
		return nil, fmt.Errorf("get anchor URI for DID [%s]: %w", did, err)
	}
	info.CanonicalReference, err = r.getProperty(registry.CanonicalReferenceProperty, metadata, false)
	if err != nil {
		return nil, fmt.Errorf("get canonical ID for DID [%s]: %w", did, err)
	}
	return info, nil
}
func ( r * AnchorInfoRetriever ) GetAnchorInfo ( did string ) ( * AnchorInfo , error ) { metadata , err := r . resourceRegistry . GetResourceInfo ( did ) if err != nil { return nil , fmt . Errorf ( " " , did , err ) } info := & AnchorInfo { } info . AnchorOrigin , err = r . getProperty ( registry . AnchorOriginProperty , metadata , true ) if err != nil { return nil , fmt . Errorf ( " " , did , err ) } info . AnchorURI , err = r . getProperty ( registry . AnchorURIProperty , metadata , true ) if err != nil { return nil , fmt . Errorf ( " " , did , err ) } info . CanonicalReference , err = r . getProperty ( registry . CanonicalReferenceProperty , metadata , false ) if err != nil { return nil , fmt . Errorf ( " " , did , err ) } return info , nil }
GetAnchorInfo returns anchor information about the given DID.
GetAnchorInfo returns anchor information about the given DID .
// TODO (#537): Show IPFS alternates if configured.