// NewClient creates a new hyper client
NewClient creates a new hyper client
// NewClient creates a new hyper client
func NewClient(server string, timeout time.Duration) (*Client, error) {
	conn, err := grpc.Dial(server, grpc.WithInsecure(),
		grpc.WithTimeout(timeout),
		grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
			return net.DialTimeout("tcp", addr, timeout)
		}))
	if err != nil {
		return nil, err
	}
	return &Client{
		client:  types.NewPublicAPIClient(conn),
		timeout: timeout,
	}, nil
}
func NewClient ( server string , timeout time . Duration ) ( * Client , error ) { conn , err := grpc . Dial ( server , grpc . WithInsecure ( ) , grpc . WithTimeout ( timeout ) , grpc . WithDialer ( func ( addr string , timeout time . Duration ) ( net . Conn , error ) { return net . DialTimeout ( " " , addr , timeout ) } ) ) if err != nil { return nil , err } return & Client { client : types . NewPublicAPIClient ( conn ) , timeout : timeout , } , nil }
NewClient creates a new hyper client
NewClient creates a new hyper client