func (c *Client) SignRawTransaction(tx *wire.MsgTx) (*wire.MsgTx, bool, error) {
	return c.SignRawTransactionAsync(tx).Receive()
}
SignRawTransaction signs inputs for the passed transaction and returns the
signed transaction as well as whether or not all inputs are now signed.

This function assumes the RPC server already knows the input transactions and
private keys for the passed transaction which needs to be signed and uses the
default signature hash type.  Use one of the SignRawTransaction# variants to
specify that information if needed.
package rpcclient
import (
	"bytes"
	"encoding/hex"
	"encoding/json"
	"github.com/soteria-dag/soterd/soterjson"
	"github.com/soteria-dag/soterd/chaincfg/chainhash"
	"github.com/soteria-dag/soterd/wire"
	"github.com/soteria-dag/soterd/soterutil"
)
type SigHashType string
const (
	SigHashAll SigHashType = "ALL"
	SigHashNone SigHashType = "NONE"
	SigHashSingle SigHashType = "SINGLE"
	SigHashAllAnyoneCanPay SigHashType = "ALL|ANYONECANPAY"
	SigHashNoneAnyoneCanPay SigHashType = "NONE|ANYONECANPAY"
	SigHashSingleAnyoneCanPay SigHashType = "SINGLE|ANYONECANPAY"
)
func (s SigHashType) String() string {
	return string(s)
}
type FutureGetRawTransactionResult chan *response
func (r FutureGetRawTransactionResult) Receive() (*soterutil.Tx, error) {
	res, err := receiveFuture(r)
	if err != nil {
		return nil, err
	}
	var txHex string
	err = json.Unmarshal(res, &txHex)
	if err != nil {
		return nil, err
	}
	serializedTx, err := hex.DecodeString(txHex)
	if err != nil {
		return nil, err
	}
	var msgTx wire.MsgTx
	if err := msgTx.Deserialize(bytes.NewReader(serializedTx)); err != nil {
		return nil, err
	}
	return soterutil.NewTx(&msgTx), nil
}
func (c *Client) GetRawTransactionAsync(txHash *chainhash.Hash) FutureGetRawTransactionResult {
	hash := ""
	if txHash != nil {
		hash = txHash.String()
	}
	cmd := soterjson.NewGetRawTransactionCmd(hash, soterjson.Int(0))
	return c.sendCmd(cmd)
}
func (c *Client) GetRawTransaction(txHash *chainhash.Hash) (*soterutil.Tx, error) {
	return c.GetRawTransactionAsync(txHash).Receive()
}
type FutureGetRawTransactionVerboseResult chan *response
func (r FutureGetRawTransactionVerboseResult) Receive() (*soterjson.TxRawResult, error) {
	res, err := receiveFuture(r)
	if err != nil {
		return nil, err
	}
	var rawTxResult soterjson.TxRawResult
	err = json.Unmarshal(res, &rawTxResult)
	if err != nil {
		return nil, err
	}
	return &rawTxResult, nil
}
func (c *Client) GetRawTransactionVerboseAsync(txHash *chainhash.Hash) FutureGetRawTransactionVerboseResult {
	hash := ""
	if txHash != nil {
		hash = txHash.String()
	}
	cmd := soterjson.NewGetRawTransactionCmd(hash, soterjson.Int(1))
	return c.sendCmd(cmd)
}
func (c *Client) GetRawTransactionVerbose(txHash *chainhash.Hash) (*soterjson.TxRawResult, error) {
	return c.GetRawTransactionVerboseAsync(txHash).Receive()
}
type FutureDecodeRawTransactionResult chan *response
func (r FutureDecodeRawTransactionResult) Receive() (*soterjson.TxRawResult, error) {
	res, err := receiveFuture(r)
	if err != nil {
		return nil, err
	}
	var rawTxResult soterjson.TxRawResult
	err = json.Unmarshal(res, &rawTxResult)
	if err != nil {
		return nil, err
	}
	return &rawTxResult, nil
}
func (c *Client) DecodeRawTransactionAsync(serializedTx []byte) FutureDecodeRawTransactionResult {
	txHex := hex.EncodeToString(serializedTx)
	cmd := soterjson.NewDecodeRawTransactionCmd(txHex)
	return c.sendCmd(cmd)
}
func (c *Client) DecodeRawTransaction(serializedTx []byte) (*soterjson.TxRawResult, error) {
	return c.DecodeRawTransactionAsync(serializedTx).Receive()
}
type FutureCreateRawTransactionResult chan *response
func (r FutureCreateRawTransactionResult) Receive() (*wire.MsgTx, error) {
	res, err := receiveFuture(r)
	if err != nil {
		return nil, err
	}
	var txHex string
	err = json.Unmarshal(res, &txHex)
	if err != nil {
		return nil, err
	}
	serializedTx, err := hex.DecodeString(txHex)
	if err != nil {
		return nil, err
	}
	var msgTx wire.MsgTx
	if err := msgTx.Deserialize(bytes.NewReader(serializedTx)); err != nil {
		return nil, err
	}
	return &msgTx, nil
}
func (c *Client) CreateRawTransactionAsync(inputs []soterjson.TransactionInput,
	amounts map[soterutil.Address]soterutil.Amount, lockTime *int64) FutureCreateRawTransactionResult {
	convertedAmts := make(map[string]float64, len(amounts))
	for addr, amount := range amounts {
		convertedAmts[addr.String()] = amount.ToSOTER()
	}
	cmd := soterjson.NewCreateRawTransactionCmd(inputs, convertedAmts, lockTime)
	return c.sendCmd(cmd)
}
func (c *Client) CreateRawTransaction(inputs []soterjson.TransactionInput,
	amounts map[soterutil.Address]soterutil.Amount, lockTime *int64) (*wire.MsgTx, error) {
	return c.CreateRawTransactionAsync(inputs, amounts, lockTime).Receive()
}
type FutureSendRawTransactionResult chan *response
func (r FutureSendRawTransactionResult) Receive() (*chainhash.Hash, error) {
	res, err := receiveFuture(r)
	if err != nil {
		return nil, err
	}
	var txHashStr string
	err = json.Unmarshal(res, &txHashStr)
	if err != nil {
		return nil, err
	}
	return chainhash.NewHashFromStr(txHashStr)
}
func (c *Client) SendRawTransactionAsync(tx *wire.MsgTx, allowHighFees bool) FutureSendRawTransactionResult {
	txHex := ""
	if tx != nil {
		buf := bytes.NewBuffer(make([]byte, 0, tx.SerializeSize()))
		if err := tx.Serialize(buf); err != nil {
			return newFutureError(err)
		}
		txHex = hex.EncodeToString(buf.Bytes())
	}
	cmd := soterjson.NewSendRawTransactionCmd(txHex, &allowHighFees)
	return c.sendCmd(cmd)
}
func (c *Client) SendRawTransaction(tx *wire.MsgTx, allowHighFees bool) (*chainhash.Hash, error) {
	return c.SendRawTransactionAsync(tx, allowHighFees).Receive()
}
type FutureSignRawTransactionResult chan *response
func (r FutureSignRawTransactionResult) Receive() (*wire.MsgTx, bool, error) {
	res, err := receiveFuture(r)
	if err != nil {
		return nil, false, err
	}
	var signRawTxResult soterjson.SignRawTransactionResult
	err = json.Unmarshal(res, &signRawTxResult)
	if err != nil {
		return nil, false, err
	}
	serializedTx, err := hex.DecodeString(signRawTxResult.Hex)
	if err != nil {
		return nil, false, err
	}
	var msgTx wire.MsgTx
	if err := msgTx.Deserialize(bytes.NewReader(serializedTx)); err != nil {
		return nil, false, err
	}
	return &msgTx, signRawTxResult.Complete, nil
}
func (c *Client) SignRawTransactionAsync(tx *wire.MsgTx) FutureSignRawTransactionResult {
	txHex := ""
	if tx != nil {
		buf := bytes.NewBuffer(make([]byte, 0, tx.SerializeSize()))
		if err := tx.Serialize(buf); err != nil {
			return newFutureError(err)
		}
		txHex = hex.EncodeToString(buf.Bytes())
	}
	cmd := soterjson.NewSignRawTransactionCmd(txHex, nil, nil, nil)
	return c.sendCmd(cmd)
}