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)
- func CreateMnemonic() (string, error)
- type Client
- func (c *Client) BroadcastTx(msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (c *Client) TxDelegateFeedConsent(feeder sdk.AccAddress) (*sdk.TxResponse, error)
- func (c *Client) TxSubmitLegacyProposal(changes []proposal.ParamChange) (*sdk.TxResponse, error)
- func (c *Client) TxSubmitProposal(msgs []sdk.Msg, deposit sdk.Coins) (*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.
func CreateAccountFromMnemonic ¶
CreateAccountFromMnemonic creates a new account from a mnemonic
func CreateMnemonic ¶ added in v0.1.4
Types ¶
type Client ¶
type Client struct { ChainID string TMRPCEndpoint string ClientContext *client.Context // contains filtered or unexported fields }
TxClient is a wrapper around the cosmos sdk client context and transaction factory for signing and broadcasting transactions
func NewClient ¶
func NewClient( 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) TxDelegateFeedConsent ¶
func (c *Client) TxDelegateFeedConsent( feeder sdk.AccAddress, ) (*sdk.TxResponse, error)
TxDelegateFeedConsent delegates the feed consent to the given feeder from the OjoClient's validator
func (*Client) TxSubmitLegacyProposal ¶
func (c *Client) TxSubmitLegacyProposal( changes []proposal.ParamChange, ) (*sdk.TxResponse, error)
TxSubmitProposal sends a gov/v1beta1 transaction to submit a proposal
func (*Client) TxSubmitProposal ¶
TxSubmitProposal sends a gov/v1 transaction to submit a proposal