Documentation ¶
Index ¶
- func BroadcastTx(clientCtx client.Context, txf tx.Factory, msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func CreateAccountFromMnemonic(name, mnemonic string) (*keyring.Record, keyring.Keyring, error)
- type Client
- func (c *Client) BroadcastTx(msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (c *Client) TxSend(fromAddress string, toAddress string, amount sdk.Coins) (*sdk.TxResponse, error)
- func (c *Client) TxSubmitProposal(changes []proposal.ParamChange) (*sdk.TxResponse, error)
- func (c *Client) TxVoteYes(proposalID uint64) (*sdk.TxResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastTx ¶
func BroadcastTx(clientCtx client.Context, txf tx.Factory, msgs ...sdk.Msg) (*sdk.TxResponse, error)
BroadcastTx attempts to generate, sign and broadcast a transaction with the given set of messages. It will also simulate gas requirements if necessary. It will return an error upon failure.
Note, BroadcastTx is copied from the SDK except it removes a few unnecessary things like prompting for confirmation and printing the response. Instead, we return the TxResponse.
Types ¶
type Client ¶
type Client struct { ChainID string TMRPCEndpoint string ClientContext *client.Context // contains filtered or unexported fields }
func NewTxClient ¶
func NewTxClient( chainID string, tmrpcEndpoint string, accountName string, accountMnemonic string, ) (c *Client, err error)
Initializes a cosmos sdk client context and transaction factory for signing and broadcasting transactions
func (*Client) BroadcastTx ¶
func (*Client) TxSubmitProposal ¶
func (c *Client) TxSubmitProposal( changes []proposal.ParamChange, ) (*sdk.TxResponse, error)
Click to show internal directories.
Click to hide internal directories.