func NewClient(w *Wallet, s *Server) *Client {
	flag.Parse()
	uri := url.URL{Scheme: "ws", Host: *addr, Path: "/api"}
	fmt.Printf("Connecting to %s", uri.String())

	d := wstest.NewDialer(s)
	c, _, err := d.Dial(uri.String(), nil)
	if err != nil {
		panic(err)
	}

	requests := make(chan *Message)
	responses := make(chan *Message)
	requestLogs := make([]*Message, 0)
	responseLogs := make([]*Message, 0)

	return &Client{connection: c,
		wallet:       w,
		requests:     requests,
		responses:    responses,
		requestLogs:  requestLogs,
		responseLogs: responseLogs,
	}
}
// NewClient a default client struct connected to the given server
NewClient a default client struct connected to the given server
// NewClient a default client struct connected to the given server
func NewClient(w *Wallet, s *Server) *Client {
	flag.Parse()
	uri := url.URL{Scheme: "ws", Host: *addr, Path: "/api"}
	fmt.Printf("Connecting to %s", uri.String())
	d := wstest.NewDialer(s)
	c, _, err := d.Dial(uri.String(), nil)
	if err != nil {
		panic(err)
	}
	requests := make(chan *Message)
	responses := make(chan *Message)
	requestLogs := make([]*Message, 0)
	responseLogs := make([]*Message, 0)
	return &Client{connection: c,
		wallet:       w,
		requests:     requests,
		responses:    responses,
		requestLogs:  requestLogs,
		responseLogs: responseLogs,
	}
}
func NewClient ( w * Wallet , s * Server ) * Client { flag . Parse ( ) uri := url . URL { Scheme : " " , Host : * addr , Path : " " } fmt . Printf ( " " , uri . String ( ) ) d := wstest . NewDialer ( s ) c , _ , err := d . Dial ( uri . String ( ) , nil ) if err != nil { panic ( err ) } requests := make ( chan * Message ) responses := make ( chan * Message ) requestLogs := make ( [ ] * Message , 0 ) responseLogs := make ( [ ] * Message , 0 ) return & Client { connection : c , wallet : w , requests : requests , responses : responses , requestLogs : requestLogs , responseLogs : responseLogs , } }
NewClient a default client struct connected to the given server
NewClient a default client struct connected to the given server