func (c *Client) SignRawSSGenTx(ctx context.Context, tx *wire.MsgTx) (*wire.MsgTx, bool, error) {
	var signedTx *wire.MsgTx
	var res = struct {
		Tx       json.Unmarshaler `json:"hex"`
		Complete bool             `json:"complete"`
	}{
		Tx: unmarshalTx(&signedTx),
	}
	err := c.Call(ctx, "signrawtransaction", &res, marshalTx(tx), nil, nil, "ssgen")
	return signedTx, res.Complete, err
}
SignRawSSGenTx signs inputs for the passed transaction using the
the specified signature hash type given the list of information about extra
input transactions and a potential list of private keys needed to perform
the signing process.  The private keys, if specified, must be in wallet
import format (WIF).

The only input transactions that need to be specified are ones the RPC server
does not already know.  This means the list of transaction inputs can be nil
if the RPC server already knows them all.
package dcrwallet
import (
	"context"
	"encoding/hex"
	"encoding/json"
	"strings"
	"decred.org/dcrwallet/v2/rpc/jsonrpc/types"
	"github.com/decred/dcrd/chaincfg/chainhash"
	"github.com/decred/dcrd/dcrutil/v4"
	"github.com/decred/dcrd/hdkeychain/v3"
	dcrdtypes "github.com/decred/dcrd/rpc/jsonrpc/types/v3"
	"github.com/decred/dcrd/txscript/v4/stdaddr"
	"github.com/decred/dcrd/wire"
)
func (c *Client) GetTransaction(ctx context.Context, txHash *chainhash.Hash) (*types.GetTransactionResult, error) {
	res := new(types.GetTransactionResult)
	err := c.Call(ctx, "gettransaction", res, txHash.String())
	return res, err
}
func (c *Client) ListTransactions(ctx context.Context, account string) ([]types.ListTransactionsResult, error) {
	var res []types.ListTransactionsResult
	err := c.Call(ctx, "listtransactions", &res, account)
	return res, err
}
func (c *Client) ListTransactionsCount(ctx context.Context, account string, count int) ([]types.ListTransactionsResult, error) {
	var res []types.ListTransactionsResult
	err := c.Call(ctx, "listtransactions", &res, account, count)
	return res, err
}
func (c *Client) ListTransactionsCountFrom(ctx context.Context, account string, count, from int) ([]types.ListTransactionsResult, error) {
	var res []types.ListTransactionsResult
	err := c.Call(ctx, "listtransactions", &res, account, count, from)
	return res, err
}
func (c *Client) ListUnspent(ctx context.Context) ([]types.ListUnspentResult, error) {
	var res []types.ListUnspentResult
	err := c.Call(ctx, "listunspent", &res)
	return res, err
}
func (c *Client) ListUnspentMin(ctx context.Context, minConf int) ([]types.ListUnspentResult, error) {
	var res []types.ListUnspentResult
	err := c.Call(ctx, "listunspent", &res, minConf)
	return res, err
}
func (c *Client) ListUnspentMinMax(ctx context.Context, minConf, maxConf int) ([]types.ListUnspentResult, error) {
	var res []types.ListUnspentResult
	err := c.Call(ctx, "listunspent", &res, minConf, maxConf)
	return res, err
}
func (c *Client) ListUnspentMinMaxAddresses(ctx context.Context, minConf, maxConf int, addrs []stdaddr.Address) ([]types.ListUnspentResult, error) {
	var res []types.ListUnspentResult
	err := c.Call(ctx, "listunspent", &res, minConf, maxConf, marshalAddresses(addrs))
	return res, err
}
func (c *Client) ListSinceBlock(ctx context.Context, blockHash *chainhash.Hash) (*types.ListSinceBlockResult, error) {
	var blockHashString *string
	if blockHash != nil {
		blockHashString = new(string)
		*blockHashString = blockHash.String()
	}
	res := new(types.ListSinceBlockResult)
	err := c.Call(ctx, "listsinceblock", res, blockHashString)
	return res, err
}
func (c *Client) ListSinceBlockMinConf(ctx context.Context, blockHash *chainhash.Hash, minConfirms int) (*types.ListSinceBlockResult, error) {
	var blockHashString *string
	if blockHash != nil {
		blockHashString = new(string)
		*blockHashString = blockHash.String()
	}
	res := new(types.ListSinceBlockResult)
	err := c.Call(ctx, "listsinceblock", res, blockHashString, minConfirms)
	return res, err
}
func (c *Client) LockUnspent(ctx context.Context, unlock bool, ops []*wire.OutPoint) error {
	outputs := make([]dcrdtypes.TransactionInput, len(ops))
	for i, op := range ops {
		outputs[i] = dcrdtypes.TransactionInput{
			Txid: op.Hash.String(),
			Vout: op.Index,
			Tree: op.Tree,
		}
	}
	return c.Call(ctx, "lockunspent", nil, unlock, outputs)
}
func (c *Client) ListLockUnspent(ctx context.Context) ([]*wire.OutPoint, error) {
	var ops []*wire.OutPoint
	err := c.Call(ctx, "listlockunspent", unmarshalOutpoints(&ops))
	return ops, err
}
func (c *Client) SendToAddress(ctx context.Context, address stdaddr.Address, amount dcrutil.Amount) (*chainhash.Hash, error) {
	var res *chainhash.Hash
	err := c.Call(ctx, "sendtoaddress", unmarshalHash(&res), address.String(), amount.ToCoin())
	return res, err
}
func (c *Client) SendFrom(ctx context.Context, fromAccount string, toAddress stdaddr.Address, amount dcrutil.Amount) (*chainhash.Hash, error) {
	var res *chainhash.Hash
	err := c.Call(ctx, "sendfrom", unmarshalHash(&res), fromAccount, toAddress.String(),
		amount.ToCoin())
	return res, err
}
func (c *Client) SendFromMinConf(ctx context.Context, fromAccount string, toAddress stdaddr.Address, amount dcrutil.Amount, minConfirms int) (*chainhash.Hash, error) {
	var res *chainhash.Hash
	err := c.Call(ctx, "sendfrom", unmarshalHash(&res), fromAccount, toAddress.String(),
		amount.ToCoin(), minConfirms)
	return res, err
}
func (c *Client) SendMany(ctx context.Context, fromAccount string, amounts map[stdaddr.Address]dcrutil.Amount) (*chainhash.Hash, error) {
	amountsObject := make(map[string]float64)
	for addr, amount := range amounts {
		amountsObject[addr.String()] = amount.ToCoin()
	}
	var res *chainhash.Hash
	err := c.Call(ctx, "sendmany", unmarshalHash(&res), fromAccount, amountsObject)
	return res, err
}
func (c *Client) SendManyMinConf(ctx context.Context, fromAccount string, amounts map[stdaddr.Address]dcrutil.Amount, minConfirms int) (*chainhash.Hash, error) {
	amountsObject := make(map[string]float64)
	for addr, amount := range amounts {
		amountsObject[addr.String()] = amount.ToCoin()
	}
	var res *chainhash.Hash
	err := c.Call(ctx, "sendmany", unmarshalHash(&res), fromAccount, amountsObject, minConfirms)
	return res, err
}
func (c *Client) PurchaseTicket(ctx context.Context, fromAccount string,
	spendLimit dcrutil.Amount, minConf *int, ticketAddress stdaddr.Address,
	numTickets *int, poolAddress stdaddr.Address, poolFees *dcrutil.Amount,
	expiry *int, ticketChange *bool, ticketFee *dcrutil.Amount) ([]*chainhash.Hash, error) {
	params := make([]interface{}, 2, 10)
	params[0] = fromAccount
	params[1] = spendLimit.ToCoin()
	var skipped int
	addParam := func(nonNil bool, value func() interface{}) {
		if nonNil {
			for i := 0; i < skipped; i++ {
				params = append(params, nil)
			}
			skipped = 0
			params = append(params, value())
		} else {
			skipped++
		}
	}
	addParam(minConf != nil, func() interface{} { return *minConf })
	addParam(ticketAddress != nil, func() interface{} { return ticketAddress.String() })
	addParam(numTickets != nil, func() interface{} { return *numTickets })
	addParam(poolAddress != nil, func() interface{} { return poolAddress.String() })
	addParam(poolFees != nil, func() interface{} { return poolFees.ToCoin() })
	addParam(expiry != nil, func() interface{} { return *expiry })
	addParam(ticketChange != nil, func() interface{} { return *ticketChange })
	addParam(ticketFee != nil, func() interface{} { return ticketFee.ToCoin() })
	var res []*chainhash.Hash
	err := c.Call(ctx, "purchaseticket", unmarshalHashes(&res), params...)
	return res, err
}
func (c *Client) AddMultisigAddress(ctx context.Context, requiredSigs int, addresses []stdaddr.Address, account string) (stdaddr.Address, error) {
	var res stdaddr.Address
	err := c.Call(ctx, "addmultisigaddress", unmarshalAddress(&res, c.net), requiredSigs,
		marshalAddresses(addresses), account)
	return res, err
}
func (c *Client) CreateMultisig(ctx context.Context, requiredSigs int, addresses []stdaddr.Address) (*types.CreateMultiSigResult, error) {
	res := new(types.CreateMultiSigResult)
	err := c.Call(ctx, "createmultisig", res, requiredSigs, marshalAddresses(addresses))
	return res, err
}
func (c *Client) CreateNewAccount(ctx context.Context, account string) error {
	return c.Call(ctx, "createnewaccount", nil, account)
}
type GapPolicy string
const (
	GapPolicyError  GapPolicy = "error"
	GapPolicyIgnore GapPolicy = "ignore"
	GapPolicyWrap   GapPolicy = "wrap"
)
func (c *Client) GetNewAddress(ctx context.Context, account string) (stdaddr.Address, error) {
	var addr stdaddr.Address
	err := c.Call(ctx, "getnewaddress", unmarshalAddress(&addr, c.net), account)
	return addr, err
}
func (c *Client) GetNewAddressGapPolicy(ctx context.Context, account string, gapPolicy GapPolicy) (stdaddr.Address, error) {
	var addr stdaddr.Address
	err := c.Call(ctx, "getnewaddress", unmarshalAddress(&addr, c.net), account, string(gapPolicy))
	return addr, err
}
func (c *Client) GetRawChangeAddress(ctx context.Context, account string, net stdaddr.AddressParams) (stdaddr.Address, error) {
	var addr stdaddr.Address
	err := c.Call(ctx, "getrawchangeaddress", unmarshalAddress(&addr, c.net), account)
	return addr, err
}
func (c *Client) GetAccountAddress(ctx context.Context, account string) (stdaddr.Address, error) {
	var addr stdaddr.Address
	err := c.Call(ctx, "getaccountaddress", unmarshalAddress(&addr, c.net), account)
	return addr, err
}
func (c *Client) GetAccount(ctx context.Context, address stdaddr.Address) (string, error) {
	var res string
	err := c.Call(ctx, "getaccount", &res, address.String())
	return res, err
}
func (c *Client) GetAddressesByAccount(ctx context.Context, account string) ([]stdaddr.Address, error) {
	var addrs []stdaddr.Address
	err := c.Call(ctx, "getaddressesbyaccount", unmarshalAddresses(&addrs, c.net), account)
	return addrs, err
}
func (c *Client) RenameAccount(ctx context.Context, oldAccount, newAccount string) error {
	return c.Call(ctx, "renameaccount", nil, oldAccount, newAccount)
}
func (c *Client) ValidateAddress(ctx context.Context, address stdaddr.Address) (*types.ValidateAddressWalletResult, error) {
	res := new(types.ValidateAddressWalletResult)
	err := c.Call(ctx, "validateaddress", res, address.String())
	return res, err
}
func (c *Client) ListAccounts(ctx context.Context) (map[string]dcrutil.Amount, error) {
	res := make(map[string]dcrutil.Amount)
	err := c.Call(ctx, "listaccounts", unmarshalListAccounts(res))
	return res, err
}
func (c *Client) ListAccountsMinConf(ctx context.Context, minConfirms int) (map[string]dcrutil.Amount, error) {
	res := make(map[string]dcrutil.Amount)
	err := c.Call(ctx, "listaccounts", unmarshalListAccounts(res), minConfirms)
	return res, err
}
func (c *Client) GetMasterPubkey(ctx context.Context, account string) (*hdkeychain.ExtendedKey, error) {
	var res *hdkeychain.ExtendedKey
	err := c.Call(ctx, "getmasterpubkey", unmarshalHDKey(&res, c.net), account)
	return res, err
}
func (c *Client) GetBalance(ctx context.Context, account string) (*types.GetBalanceResult, error) {
	res := new(types.GetBalanceResult)
	err := c.Call(ctx, "getbalance", res, account)
	return res, err
}
func (c *Client) GetBalanceMinConf(ctx context.Context, account string, minConfirms int) (*types.GetBalanceResult, error) {
	res := new(types.GetBalanceResult)
	err := c.Call(ctx, "getbalance", res, account, minConfirms)
	return res, err
}
func (c *Client) GetReceivedByAccount(ctx context.Context, account string) (dcrutil.Amount, error) {
	var res dcrutil.Amount
	err := c.Call(ctx, "getreceivedbyaccount", unmarshalAmount(&res), account)
	return res, err
}
func (c *Client) GetReceivedByAccountMinConf(ctx context.Context, account string, minConfirms int) (dcrutil.Amount, error) {
	var res dcrutil.Amount
	err := c.Call(ctx, "getreceivedbyaccount", unmarshalAmount(&res), account, minConfirms)
	return res, err
}
func (c *Client) GetUnconfirmedBalance(ctx context.Context, account string) (dcrutil.Amount, error) {
	var res dcrutil.Amount
	err := c.Call(ctx, "getunconfirmedbalance", unmarshalAmount(&res), account)
	return res, err
}
func (c *Client) GetReceivedByAddress(ctx context.Context, address stdaddr.Address) (dcrutil.Amount, error) {
	var res dcrutil.Amount
	err := c.Call(ctx, "getreceivedbyaddress", unmarshalAmount(&res), address.String())
	return res, err
}
func (c *Client) GetReceivedByAddressMinConf(ctx context.Context, address stdaddr.Address, minConfirms int) (dcrutil.Amount, error) {
	var res dcrutil.Amount
	err := c.Call(ctx, "getreceivedbyaddress", unmarshalAmount(&res), address.String(), minConfirms)
	return res, err
}
func (c *Client) ListReceivedByAccount(ctx context.Context) ([]types.ListReceivedByAccountResult, error) {
	var res []types.ListReceivedByAccountResult
	err := c.Call(ctx, "listreceivedbyacccount", &res)
	return res, err
}
func (c *Client) ListReceivedByAccountMinConf(ctx context.Context, minConfirms int) ([]types.ListReceivedByAccountResult, error) {
	var res []types.ListReceivedByAccountResult
	err := c.Call(ctx, "listreceivedbyacccount", &res, minConfirms)
	return res, err
}
func (c *Client) ListReceivedByAccountIncludeEmpty(ctx context.Context, minConfirms int, includeEmpty bool) ([]types.ListReceivedByAccountResult, error) {
	var res []types.ListReceivedByAccountResult
	err := c.Call(ctx, "listreceivedbyacccount", &res, minConfirms, includeEmpty)
	return res, err
}
func (c *Client) ListReceivedByAddress(ctx context.Context) ([]types.ListReceivedByAddressResult, error) {
	var res []types.ListReceivedByAddressResult
	err := c.Call(ctx, "listreceivedbyaddress", &res)
	return res, err
}
func (c *Client) ListReceivedByAddressMinConf(ctx context.Context, minConfirms int) ([]types.ListReceivedByAddressResult, error) {
	var res []types.ListReceivedByAddressResult
	err := c.Call(ctx, "listreceivedbyaddress", &res, minConfirms)
	return res, err
}
func (c *Client) ListReceivedByAddressIncludeEmpty(ctx context.Context, minConfirms int, includeEmpty bool) ([]types.ListReceivedByAddressResult, error) {
	var res []types.ListReceivedByAddressResult
	err := c.Call(ctx, "listreceivedbyaddress", &res, minConfirms, includeEmpty)
	return res, err
}
func (c *Client) AccountUnlocked(ctx context.Context, account string) (*types.AccountUnlockedResult, error) {
	res := new(types.AccountUnlockedResult)
	err := c.Call(ctx, "accountunlocked", res, account)
	return res, err
}
func (c *Client) LockAccount(ctx context.Context, account string) error {
	return c.Call(ctx, "lockaccount", nil, account)
}
func (c *Client) UnlockAccount(ctx context.Context, account, passphrase string) error {
	return c.Call(ctx, "unlockaccount", nil, account, passphrase)
}
func (c *Client) WalletLock(ctx context.Context) error {
	return c.Call(ctx, "walletlock", nil)
}
func (c *Client) WalletPassphrase(ctx context.Context, passphrase string, timeoutSecs int64) error {
	return c.Call(ctx, "walletpassphrase", nil, passphrase, timeoutSecs)
}
func (c *Client) WalletPassphraseChange(ctx context.Context, old, new string) error {
	return c.Call(ctx, "walletpassphrasechange", nil, old, new)
}
func (c *Client) SignMessage(ctx context.Context, address stdaddr.Address, message string) (string, error) {
	var res string
	err := c.Call(ctx, "signmessage", &res, address.String(), message)
	return res, err
}
func (c *Client) VerifyMessage(ctx context.Context, address stdaddr.Address, signature, message string) (bool, error) {
	var res bool
	err := c.Call(ctx, "verifymessage", &res, address.String(), signature, message)
	return res, err
}
func (c *Client) DumpPrivKey(ctx context.Context, address stdaddr.Address) (*dcrutil.WIF, error) {
	var res *dcrutil.WIF
	err := c.Call(ctx, "dumpprivkey", unmarshalWIF(&res, c.net), address.String())
	return res, err
}
func (c *Client) ImportPrivKey(ctx context.Context, privKeyWIF *dcrutil.WIF) error {
	return c.Call(ctx, "importprivkey", nil, privKeyWIF.String())
}
func (c *Client) ImportPrivKeyLabel(ctx context.Context, privKeyWIF *dcrutil.WIF, label string) error {
	return c.Call(ctx, "importprivkey", nil, privKeyWIF.String(), label)
}
func (c *Client) ImportPrivKeyRescan(ctx context.Context, privKeyWIF *dcrutil.WIF, label string, rescan bool) error {
	return c.Call(ctx, "importprivkey", nil, privKeyWIF.String(), label, rescan)
}
func (c *Client) ImportPrivKeyRescanFrom(ctx context.Context, privKeyWIF *dcrutil.WIF, label string, rescan bool, scanFrom int) error {
	return c.Call(ctx, "importprivkey", nil, privKeyWIF.String(), label, rescan, scanFrom)
}
func (c *Client) ImportScript(ctx context.Context, script []byte) error {
	return c.Call(ctx, "importscript", nil, hex.EncodeToString(script))
}
func (c *Client) ImportScriptRescan(ctx context.Context, script []byte, rescan bool) error {
	return c.Call(ctx, "importscript", nil, hex.EncodeToString(script), rescan)
}
func (c *Client) ImportScriptRescanFrom(ctx context.Context, script []byte, rescan bool, scanFrom int) error {
	return c.Call(ctx, "importscript", nil, hex.EncodeToString(script), rescan, scanFrom)
}
func (c *Client) AccountAddressIndex(ctx context.Context, account string, branch uint32) (int, error) {
	var res int
	err := c.Call(ctx, "accountaddressindex", &res, account, branch)
	return res, err
}
func (c *Client) AccountSyncAddressIndex(ctx context.Context, account string, branch uint32, index int) error {
	return c.Call(ctx, "accountsyncaddressindex", nil, account, branch, index)
}
func (c *Client) RevokeTickets(ctx context.Context) error {
	return c.Call(ctx, "revoketickets", nil)
}
func (c *Client) AddTicket(ctx context.Context, ticket *dcrutil.Tx) error {
	return c.Call(ctx, "addticket", nil, marshalTx(ticket.MsgTx()))
}
func (c *Client) FundRawTransaction(ctx context.Context, rawhex string, fundAccount string, options types.FundRawTransactionOptions) (*types.FundRawTransactionResult, error) {
	res := new(types.FundRawTransactionResult)
	err := c.Call(ctx, "fundrawtransaction", res, rawhex, fundAccount, options)
	return res, err
}
func (c *Client) GenerateVote(ctx context.Context, blockHash *chainhash.Hash, height int64, sstxHash *chainhash.Hash, voteBits uint16, voteBitsExt string) (*types.GenerateVoteResult, error) {
	res := new(types.GenerateVoteResult)
	err := c.Call(ctx, "generatevote", res, blockHash.String(), height, sstxHash.String(),
		voteBits, voteBitsExt)
	return res, err
}
func (c *Client) GetInfo(ctx context.Context) (*types.InfoWalletResult, error) {
	res := new(types.InfoWalletResult)
	err := c.Call(ctx, "getinfo", res)
	return res, err
}
func (c *Client) GetStakeInfo(ctx context.Context) (*types.GetStakeInfoResult, error) {
	res := new(types.GetStakeInfoResult)
	err := c.Call(ctx, "getstakeinfo", res)
	return res, err
}
func (c *Client) GetTickets(ctx context.Context, includeImmature bool) ([]*chainhash.Hash, error) {
	var hashes []*chainhash.Hash
	var res = struct {
		Hashes json.Unmarshaler `json:"hashes"`
	}{
		Hashes: unmarshalHashes(&hashes),
	}
	err := c.Call(ctx, "gettickets", &res, includeImmature)
	return hashes, err
}
func (c *Client) SetTxFee(ctx context.Context, fee dcrutil.Amount) error {
	return c.Call(ctx, "settxfee", nil, fee.ToCoin())
}
func (c *Client) GetVoteChoices(ctx context.Context) (*types.GetVoteChoicesResult, error) {
	res := new(types.GetVoteChoicesResult)
	err := c.Call(ctx, "getvotechoices", res)
	return res, err
}
func (c *Client) SetVoteChoice(ctx context.Context, agendaID, choiceID string) error {
	return c.Call(ctx, "setvotechoice", nil, agendaID, choiceID)
}
func (c *Client) TicketsForAddress(ctx context.Context, addr stdaddr.Address) (*dcrdtypes.TicketsForAddressResult, error) {
	res := new(dcrdtypes.TicketsForAddressResult)
	err := c.Call(ctx, "ticketsforaddress", res, addr.String())
	return res, err
}
func (c *Client) WalletInfo(ctx context.Context) (*types.WalletInfoResult, error) {
	res := new(types.WalletInfoResult)
	err := c.Call(ctx, "walletinfo", res)
	return res, err
}
func (c *Client) ListAddressTransactions(ctx context.Context, addresses []stdaddr.Address, account string) ([]types.ListTransactionsResult, error) {
	var res []types.ListTransactionsResult
	err := c.Call(ctx, "listaddresstransactions", &res, marshalAddresses(addresses), account)
	return res, err
}
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 SignatureErrors []types.SignRawTransactionError
func (e SignatureErrors) Error() string {
	if len(e) == 0 {
		return "<nil>"
	}
	if len(e) == 1 {
		return e[0].Error
	}
	var s strings.Builder
	s.WriteString("multiple signature errors: [")
	for i := range e {
		if i != 0 {
			s.WriteString("; ")
		}
		s.WriteString(`"`)
		s.WriteString(e[i].Error)
		s.WriteString(`"`)
	}
	s.WriteString("]")
	return s.String()
}
func (c *Client) SignRawTransaction(ctx context.Context, tx *wire.MsgTx) (*wire.MsgTx, bool, error) {
	var signedTx *wire.MsgTx
	var res = struct {
		Tx              json.Unmarshaler `json:"hex"`
		Complete        bool             `json:"complete"`
		SignatureErrors SignatureErrors  `json:"errors"`
	}{
		Tx: unmarshalTx(&signedTx),
	}
	err := c.Call(ctx, "signrawtransaction", &res, marshalTx(tx))
	if err == nil && len(res.SignatureErrors) > 0 {
		err = res.SignatureErrors
	}
	return signedTx, res.Complete, err
}
func (c *Client) SignRawTransaction2(ctx context.Context, tx *wire.MsgTx, inputs []types.RawTxInput) (*wire.MsgTx, bool, error) {
	var signedTx *wire.MsgTx
	var res = struct {
		Tx              json.Unmarshaler `json:"hex"`
		Complete        bool             `json:"complete"`
		SignatureErrors SignatureErrors  `json:"errors"`
	}{
		Tx: unmarshalTx(&signedTx),
	}
	err := c.Call(ctx, "signrawtransaction", &res, marshalTx(tx), inputs)
	if err == nil && len(res.SignatureErrors) > 0 {
		err = res.SignatureErrors
	}
	return signedTx, res.Complete, err
}
func (c *Client) SignRawTransaction3(ctx context.Context, tx *wire.MsgTx,
	inputs []types.RawTxInput,
	privKeysWIF []string) (*wire.MsgTx, bool, error) {
	var signedTx *wire.MsgTx
	var res = struct {
		Tx              json.Unmarshaler `json:"hex"`
		Complete        bool             `json:"complete"`
		SignatureErrors SignatureErrors  `json:"errors"`
	}{
		Tx: unmarshalTx(&signedTx),
	}
	err := c.Call(ctx, "signrawtransaction", &res, marshalTx(tx), inputs, privKeysWIF)
	if err == nil && len(res.SignatureErrors) > 0 {
		err = res.SignatureErrors
	}
	return signedTx, res.Complete, err
}
func (c *Client) SignRawTransaction4(ctx context.Context, tx *wire.MsgTx,
	inputs []types.RawTxInput, privKeysWIF []string,
	hashType SigHashType) (*wire.MsgTx, bool, error) {
	var signedTx *wire.MsgTx
	var res = struct {
		Tx              json.Unmarshaler `json:"hex"`
		Complete        bool             `json:"complete"`
		SignatureErrors SignatureErrors  `json:"errors"`
	}{
		Tx: unmarshalTx(&signedTx),
	}
	err := c.Call(ctx, "signrawtransaction", &res, marshalTx(tx), inputs, privKeysWIF, hashType.String())
	if err == nil && len(res.SignatureErrors) > 0 {
		err = res.SignatureErrors
	}
	return signedTx, res.Complete, err
}