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) Address() (sdk.AccAddress, error)
- func (c *Client) BroadcastTx(msgs ...sdk.Msg) (*sdk.TxResponse, error)
- func (c *Client) TxClaimAirdrop(fromAddress string, toAddress string) (*sdk.TxResponse, error)
- func (c *Client) TxDelegate(fromAddress sdk.AccAddress, validatorAddress sdk.ValAddress, amount sdk.Coin) (*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, title string, summary string) (*sdk.TxResponse, error)
- func (c *Client) TxVoteYes(proposalID uint64) (*sdk.TxResponse, error)
- type OjoAccount
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) TxClaimAirdrop ¶ added in v0.2.0
func (*Client) TxDelegate ¶ added in v0.2.0
func (c *Client) TxDelegate( fromAddress sdk.AccAddress, validatorAddress sdk.ValAddress, amount sdk.Coin, ) (*sdk.TxResponse, error)
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
type OjoAccount ¶ added in v0.2.0
type OjoAccount struct { Moniker string Mnemonic string KeyInfo *keyring.Record PrivateKey keyring.Keyring }
func NewOjoAccount ¶ added in v0.2.0
func NewOjoAccount(moniker string) (*OjoAccount, error)