Documentation
¶
Index ¶
- type CLIContext
- func (ctx CLIContext) BroadcastTx(txBytes []byte) (*ctypes.ResultBroadcastTxCommit, error)
- func (ctx CLIContext) BroadcastTxAndAwaitCommit(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
- func (ctx CLIContext) BroadcastTxAsync(tx []byte) (*ctypes.ResultBroadcastTx, error)
- func (ctx CLIContext) BroadcastTxSync(tx []byte) (*ctypes.ResultBroadcastTx, error)
- func (ctx CLIContext) GetNode() (rpcclient.Client, error)
- func (ctx CLIContext) PrintResult(obj interface{}) error
- func (ctx CLIContext) Query(path string, data []byte) (res []byte, err error)
- func (ctx CLIContext) WithClient(client rpcclient.Client) CLIContext
- func (ctx CLIContext) WithCodec(cdc *go_amino.Codec) CLIContext
- func (ctx CLIContext) WithNodeIP(nodeIP string) CLIContext
- func (ctx CLIContext) WithNodeIPAndPort(nodeIP string, nodeRPCPort int) CLIContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIContext ¶
type CLIContext struct { Codec *go_amino.Codec Client rpcclient.Client Height int64 NodeURI string Async bool TrustNode bool NonceNodeURI string JSONIndent bool }
CLIContext implements a typical CLI context created in SDK modules for transaction handling and queries.
func NewCLIContext ¶
func NewCLIContext() CLIContext
NewCLIContext returns a new initialized CLIContext with parameters from the command line using Viper.
func (CLIContext) BroadcastTx ¶
func (ctx CLIContext) BroadcastTx(txBytes []byte) (*ctypes.ResultBroadcastTxCommit, error)
func (CLIContext) BroadcastTxAndAwaitCommit ¶
func (ctx CLIContext) BroadcastTxAndAwaitCommit(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
BroadcastTxAndAwaitCommit broadcasts transaction bytes to a Tendermint node and waits for a commit.
func (CLIContext) BroadcastTxAsync ¶
func (ctx CLIContext) BroadcastTxAsync(tx []byte) (*ctypes.ResultBroadcastTx, error)
BroadcastTxAsync broadcasts transaction bytes to a Tendermint node asynchronously.
func (CLIContext) BroadcastTxSync ¶
func (ctx CLIContext) BroadcastTxSync(tx []byte) (*ctypes.ResultBroadcastTx, error)
BroadcastTxSync broadcasts transaction bytes to a Tendermint node synchronously.
func (CLIContext) PrintResult ¶
func (ctx CLIContext) PrintResult(obj interface{}) error
func (CLIContext) Query ¶
func (ctx CLIContext) Query(path string, data []byte) (res []byte, err error)
func (CLIContext) WithClient ¶
func (ctx CLIContext) WithClient(client rpcclient.Client) CLIContext
WithClient returns a copy of the context with an updated RPC client instance.
func (CLIContext) WithCodec ¶
func (ctx CLIContext) WithCodec(cdc *go_amino.Codec) CLIContext
WithCodec returns a copy of the context with an updated codec.
func (CLIContext) WithNodeIP ¶
func (ctx CLIContext) WithNodeIP(nodeIP string) CLIContext
func (CLIContext) WithNodeIPAndPort ¶
func (ctx CLIContext) WithNodeIPAndPort(nodeIP string, nodeRPCPort int) CLIContext
Click to show internal directories.
Click to hide internal directories.