func (cl *BenchClient) GetBalance(asset string) (getBalanceReply *cxrpc.GetBalanceReply, err error) {

	if cl.PrivKey == nil {
		err = fmt.Errorf("Private key nonexistent, set or specify private key so the client can sign commands")
		return
	}

	getBalanceReply = new(cxrpc.GetBalanceReply)
	getBalanceArgs := &cxrpc.GetBalanceArgs{
		Asset: asset,
	}

	// create e = hash(m)
	sha3 := sha3.New256()
	sha3.Write([]byte(asset))
	e := sha3.Sum(nil)

	// Sign
	compactSig, err := koblitz.SignCompact(koblitz.S256(), cl.PrivKey, e, false)

	// set signature in args
	getBalanceArgs.Signature = compactSig

	if err = cl.Call("OpencxRPC.GetBalance", getBalanceArgs, getBalanceReply); err != nil {
		return
	}

	return
}
// GetBalance calls the getbalance rpc command
GetBalance calls the getbalance rpc command
// GetBalance calls the getbalance rpc command
func (cl *BenchClient) GetBalance(asset string) (getBalanceReply *cxrpc.GetBalanceReply, err error) {
	if cl.PrivKey == nil {
		err = fmt.Errorf("Private key nonexistent, set or specify private key so the client can sign commands")
		return
	}
	getBalanceReply = new(cxrpc.GetBalanceReply)
	getBalanceArgs := &cxrpc.GetBalanceArgs{
		Asset: asset,
	}
	sha3 := sha3.New256()
	sha3.Write([]byte(asset))
	e := sha3.Sum(nil)
	compactSig, err := koblitz.SignCompact(koblitz.S256(), cl.PrivKey, e, false)
	getBalanceArgs.Signature = compactSig
	if err = cl.Call("OpencxRPC.GetBalance", getBalanceArgs, getBalanceReply); err != nil {
		return
	}
	return
}
func ( cl * BenchClient ) GetBalance ( asset string ) ( getBalanceReply * cxrpc . GetBalanceReply , err error ) { if cl . PrivKey == nil { err = fmt . Errorf ( " " ) return } getBalanceReply = new ( cxrpc . GetBalanceReply ) getBalanceArgs := & cxrpc . GetBalanceArgs { Asset : asset , } sha3 := sha3 . New256 ( ) sha3 . Write ( [ ] byte ( asset ) ) e := sha3 . Sum ( nil ) compactSig , err := koblitz . SignCompact ( koblitz . S256 ( ) , cl . PrivKey , e , false ) getBalanceArgs . Signature = compactSig if err = cl . Call ( " " , getBalanceArgs , getBalanceReply ) ; err != nil { return } return }
GetBalance calls the getbalance rpc command
GetBalance calls the getbalance rpc command
// create e = hash(m) // Sign // set signature in args