func (c *RPC) BuildAndBroadcastMsg(msg sdktypes.Msg) (*abci.ResponseDeliverTx, error) {
	signedTx, err := c.buildAndBroadcastMsgNoResult(msg)
	if err != nil {
		return nil, err
	}
	return c.waitForTxResult(signedTx)
}
BuildAndBroadcastMsg builds and signs message and broadcast it to node.
package cosmos
import (
	"context"
	"errors"
	"fmt"
	"sync"
	"time"
	"github.com/cosmos/cosmos-sdk/client/flags"
	"github.com/cosmos/cosmos-sdk/codec"
	"github.com/cosmos/cosmos-sdk/crypto/keys"
	sdktypes "github.com/cosmos/cosmos-sdk/types"
	"github.com/cosmos/cosmos-sdk/x/auth"
	authutils "github.com/cosmos/cosmos-sdk/x/auth/client/utils"
	authExported "github.com/cosmos/cosmos-sdk/x/auth/exported"
	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
	"github.com/mesg-foundation/engine/ext/xreflect"
	abci "github.com/tendermint/tendermint/abci/types"
	rpcclient "github.com/tendermint/tendermint/rpc/client"
	tenderminttypes "github.com/tendermint/tendermint/types"
)
type RPC struct {
	rpcclient.Client
	cdc         *codec.Codec
	kb          keys.Keybase
	chainID     string
	accName     string
	accPassword string
	gasPrices   sdktypes.DecCoins
	acc            authExported.Account
	accountMutex   sync.Mutex
	broadcastMutex sync.Mutex
}
func NewRPC(client rpcclient.Client, cdc *codec.Codec, kb keys.Keybase, chainID, accName, accPassword, gasPrices string) (*RPC, error) {
	gasPricesDecoded, err := sdktypes.ParseDecCoins(gasPrices)
	if err != nil {
		return nil, err
	}
	return &RPC{
		Client:      client,
		cdc:         cdc,
		kb:          kb,
		chainID:     chainID,
		accName:     accName,
		accPassword: accPassword,
		gasPrices:   gasPricesDecoded,
	}, nil
}
func (c *RPC) Codec() *codec.Codec {
	return c.cdc
}
func (c *RPC) QueryJSON(path string, qdata, ptr interface{}) error {
	var data []byte
	if !xreflect.IsNil(qdata) {
		b, err := c.cdc.MarshalJSON(qdata)
		if err != nil {
			return err
		}
		data = b
	}
	result, _, err := c.QueryWithData(path, data)
	if err != nil {
		return err
	}
	return c.cdc.UnmarshalJSON(result, ptr)
}
func (c *RPC) QueryWithData(path string, data []byte) ([]byte, int64, error) {
	result, err := c.ABCIQuery(path, data)
	if err != nil {
		return nil, 0, err
	}
	resp := result.Response
	if !resp.IsOK() {
		return nil, resp.Height, errors.New(resp.Log)
	}
	return resp.Value, resp.Height, nil
}