code: func (a *API) Resolve(ctx context.Context, address string) (storage.Address, error) {
  	// if DNS is not configured, return an error
  	if a.dns == nil {
  		if hashMatcher.MatchString(address) {
  			return common.Hex2Bytes(address), nil
  		}
  		apiResolveFail.Inc(1)
  		return nil, fmt.Errorf("no DNS to resolve name: %q", address)
  	}
  	// try and resolve the address
  	resolved, err := a.dns.Resolve(address)
  	if err != nil {
  		if hashMatcher.MatchString(address) {
  			return common.Hex2Bytes(address), nil
  		}
  		return nil, err
  	}
  	return resolved[:], nil
  }
docs: // Resolve a name into a content-addressed hash
  // where address could be an ENS name, or a content addressed hash