func (c *NodeClient) SendAddNode(node netlib.NodeAddr) error {
	data := ComManageNode{node}
	request, err := c.BuildCommandDataWithAuth("addnode", &data)
	err = c.SendDataWaitResponse(c.NodeAddress, request, nil)
	if err != nil {
		return errors.New(fmt.Sprintf("Add Node Response Error: %s", err.Error()))
	}
	return nil
}
Request to add new node to contacts
package nodeclient
import (
	"bytes"
	"encoding/binary"
	"time"
	"encoding/gob"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net"
	netlib "github.com/gelembjuk/democoin/lib/net"
	"github.com/gelembjuk/democoin/lib/utils"
)
type NodeClient struct {
	DataDir     string
	NodeAddress netlib.NodeAddr
	Address     string  
	Logger      *utils.LoggerMan
	NodeNet     *netlib.NodeNetwork
	NodeAuthStr string
}
type ComBlock struct {
	AddrFrom netlib.NodeAddr
	Block    []byte
}
type ComGetBlocks struct {
	AddrFrom  netlib.NodeAddr
	StartFrom []byte  
}
type ComGetFirstBlocksData struct {
	Blocks [][]byte  
	Height int
}
type ComGetData struct {
	AddrFrom netlib.NodeAddr
	Type     string
	ID       []byte
}
type ComWalletBalance struct {
	Total    float64
	Approved float64
	Pending  float64
}
type ComGetWalletBalance struct {
	Address string
}
type ComNewTransaction struct {
	Address string
	TX      []byte
}
type ComNewTransactionData struct {
	Address    string
	TX         []byte
	Signatures [][]byte
}
type ComRequestTransaction struct {
	PubKey    []byte
	To        string
	Amount    float64
	Signature []byte  
}
type ComRequestTransactionData struct {
	TX         []byte
	DataToSign [][]byte
}
type ComGetUnspentTransactions struct {
	Address   string
	LastBlock []byte
}
type ComUnspentTransaction struct {
	TXID   []byte
	Vout   int
	Amount float64
	IsBase bool
	From   string
}
type ComUnspentTransactions struct {
	Transactions []ComUnspentTransaction
	LastBlock    []byte
}
type ComGetHistoryTransactions struct {
	Address string
}
type ComHistoryTransaction struct {
	IOType bool  
	TXID   []byte
	Amount float64
	From   string
	To     string
}
type ComInv struct {
	AddrFrom netlib.NodeAddr
	Type     string
	Items    [][]byte
}
type ComTx struct {
	AddFrom     netlib.NodeAddr
	Transaction []byte  
}
type ComVersion struct {
	Version    int
	BestHeight int
	AddrFrom   netlib.NodeAddr
}
type ComManageNode struct {
	Node netlib.NodeAddr
}
type ComGetNodeState struct {
	Host                  string
	BlocksNumber          int
	ExpectingBlocksHeight int
	TransactionsCached    int
	UnspentOutputs        int
}
func (c *NodeClient) SetAuthStr(auth string) {
	c.NodeAuthStr = auth
}
func (c *NodeClient) CheckNodeAddress(address netlib.NodeAddr) error {
	if address.Port < 1024 {
		return errors.New("Node Address Port has wrong value")
	}
	if address.Port > 65536 {
		return errors.New("Node Address Port has wrong value")
	}
	if address.Host == "" {
		return errors.New("Node Address Host has wrong value")
	}
	return nil
}
func (c *NodeClient) SetNodeAddress(address netlib.NodeAddr) {
	c.NodeAddress = address
}
func (c *NodeClient) SendVoid(address netlib.NodeAddr) error {
	request := netlib.CommandToBytes("viod")
	return c.SendData(address, request)
}
func (c *NodeClient) SendAddrList(address netlib.NodeAddr, addresses []netlib.NodeAddr) error {
	request, err := c.BuildCommandData("addr", &addresses)
	if err != nil {
		return err
	}
	return c.SendData(address, request)
}
func (c *NodeClient) SendBlock(addr netlib.NodeAddr, BlockSerialised []byte) error {
	data := ComBlock{c.NodeAddress, BlockSerialised}
	request, err := c.BuildCommandData("block", &data)
	if err != nil {
		return err
	}
	return c.SendData(addr, request)
}
func (c *NodeClient) SendInv(address netlib.NodeAddr, kind string, items [][]byte) error {
	data := ComInv{c.NodeAddress, kind, items}
	request, err := c.BuildCommandData("inv", &data)
	if err != nil {
		return err
	}
	return c.SendData(address, request)
}
func (c *NodeClient) SendGetBlocks(address netlib.NodeAddr, startfrom []byte) error {
	data := ComGetBlocks{c.NodeAddress, startfrom}
	request, err := c.BuildCommandData("getblocks", &data)
	if err != nil {
		return err
	}
	return c.SendData(address, request)
}
func (c *NodeClient) SendGetBlocksUpper(address netlib.NodeAddr, startfrom []byte) error {
	data := ComGetBlocks{c.NodeAddress, startfrom}
	request, err := c.BuildCommandData("getblocksup", &data)
	if err != nil {
		return err
	}
	return c.SendData(address, request)
}
func (c *NodeClient) SendGetFirstBlocks(address netlib.NodeAddr) (*ComGetFirstBlocksData, error) {
	request, err := c.BuildCommandData("getfblocks", nil)
	if err != nil {
		return nil, err
	}
	datapayload := ComGetFirstBlocksData{}
	err = c.SendDataWaitResponse(address, request, &datapayload)
	if err != nil {
		return nil, err
	}
	return &datapayload, nil
}
func (c *NodeClient) SendGetData(address netlib.NodeAddr, kind string, id []byte) error {
	data := ComGetData{c.NodeAddress, kind, id}
	request, err := c.BuildCommandData("getdata", &data)
	if err != nil {
		return err
	}
	return c.SendData(address, request)
}
func (c *NodeClient) SendTx(addr netlib.NodeAddr, tnxserialised []byte) error {
	data := ComTx{c.NodeAddress, tnxserialised}
	request, err := c.BuildCommandData("tx", &data)
	if err != nil {
		return err
	}
	return c.SendData(addr, request)
}
func (c *NodeClient) SendVersion(addr netlib.NodeAddr, bestHeight int) error {
	data := ComVersion{netlib.NodeVersion, bestHeight, c.NodeAddress}
	request, err := c.BuildCommandData("version", &data)
	if err != nil {
		return err
	}
	return c.SendData(addr, request)
}
func (c *NodeClient) SendGetHistory(addr netlib.NodeAddr, address string) ([]ComHistoryTransaction, error) {
	data := ComGetHistoryTransactions{address}
	request, err := c.BuildCommandData("gethistory", &data)
	if err != nil {
		return nil, err
	}
	datapayload := []ComHistoryTransaction{}
	err = c.SendDataWaitResponse(addr, request, &datapayload)
	if err != nil {
		return nil, err
	}
	return datapayload, nil
}
func (c *NodeClient) SendNewTransaction(addr netlib.NodeAddr, from string, tx []byte) ([]byte, error) {
	data := ComNewTransaction{}
	data.Address = from
	data.TX = tx
	request, err := c.BuildCommandData("txfull", &data)
	NewTX := []byte{}
	if err != nil {
		return nil, err
	}
	err = c.SendDataWaitResponse(addr, request, &NewTX)
	if err != nil {
		return nil, err
	}
	return NewTX, nil
}
func (c *NodeClient) SendNewTransactionData(addr netlib.NodeAddr, from string, txBytes []byte, signatures [][]byte) ([]byte, error) {
	data := ComNewTransactionData{}
	data.Address = from
	data.TX = txBytes
	data.Signatures = signatures
	request, err := c.BuildCommandData("txdata", &data)
	NewTXID := []byte{}
	if err != nil {
		return nil, err
	}
	err = c.SendDataWaitResponse(addr, request, &NewTXID)
	if err != nil {
		return nil, err
	}
	return NewTXID, nil
}
func (c *NodeClient) SendRequestNewTransaction(addr netlib.NodeAddr,
	PubKey []byte, to string, amount float64) ([]byte, [][]byte, error) {
	data := ComRequestTransaction{}
	data.PubKey = PubKey
	data.To = to
	data.Amount = amount
	request, err := c.BuildCommandData("txrequest", &data)
	if err != nil {
		return nil, nil, err
	}
	datapayload := ComRequestTransactionData{}
	err = c.SendDataWaitResponse(addr, request, &datapayload)
	if err != nil {
		return nil, nil, err
	}
	return datapayload.TX, datapayload.DataToSign, nil
}
func (c *NodeClient) SendGetUnspent(addr netlib.NodeAddr, address string, chaintip []byte) (ComUnspentTransactions, error) {
	data := ComGetUnspentTransactions{address, chaintip}
	request, err := c.BuildCommandData("getunspent", &data)
	datapayload := ComUnspentTransactions{}
	err = c.SendDataWaitResponse(addr, request, &datapayload)
	if err != nil {
		return ComUnspentTransactions{}, err
	}
	return datapayload, nil
}
func (c *NodeClient) SendGetBalance(addr netlib.NodeAddr, address string) (ComWalletBalance, error) {
	data := ComGetWalletBalance{address}
	request, err := c.BuildCommandData("getbalance", &data)
	datapayload := ComWalletBalance{}
	err = c.SendDataWaitResponse(addr, request, &datapayload)
	if err != nil {
		return ComWalletBalance{}, err
	}
	return datapayload, nil
}
func (c *NodeClient) SendGetNodes() ([]netlib.NodeAddr, error) {
	request, err := c.BuildCommandData("getnodes", nil)
	datapayload := []netlib.NodeAddr{}
	err = c.SendDataWaitResponse(c.NodeAddress, request, &datapayload)
	if err != nil {
		return nil, errors.New(fmt.Sprintf("Get Nodes Response Error: %s", err.Error()))
	}
	return datapayload, nil
}