Documentation
¶
Index ¶
- Variables
- type BroadcastMode
- 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) GetCodec() (*goAmino.Codec, error)
- func (ctx CLIContext) GetHeight() int64
- func (ctx CLIContext) GetLogger() log.Logger
- func (ctx CLIContext) GetMaxGas() int64
- func (ctx CLIContext) GetMode() int64
- func (ctx CLIContext) GetNode() (rpcClient.Client, error)
- func (ctx CLIContext) GetNonceNodeURI() string
- func (ctx CLIContext) IsJSONIndent() bool
- func (ctx CLIContext) IsTrustNode() bool
- func (ctx CLIContext) JSONResult(obj interface{}) ([]byte, error)
- func (ctx CLIContext) PrintResult(obj interface{}) error
- func (ctx CLIContext) Query(path string, data []byte) (res []byte, err error)
- func (ctx CLIContext) WithBroadcastMode(mode string) CLIContext
- func (ctx CLIContext) WithChainID(chainID string) CLIContext
- func (ctx CLIContext) WithClient(client rpcClient.Client) CLIContext
- func (ctx CLIContext) WithCodec(cdc *goAmino.Codec) CLIContext
- func (ctx CLIContext) WithHeight(height int64) CLIContext
- func (ctx CLIContext) WithIndent(indent bool) CLIContext
- func (ctx CLIContext) WithLogger(logger log.Logger) CLIContext
- func (ctx CLIContext) WithMaxGas(maxGas int64) CLIContext
- func (ctx CLIContext) WithNodeIP(nodeIP string) CLIContext
- func (ctx CLIContext) WithNodeIPAndPort(nodeIP string, nodeRPCPort int) CLIContext
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RecordsNotFoundError = errors.New("records not found")
)
Functions ¶
This section is empty.
Types ¶
type BroadcastMode ¶ added in v0.2.4
type BroadcastMode int
const ( BroadcastBlock BroadcastMode = iota BroadcastSync BroadcastAsync )
type CLIContext ¶
type CLIContext struct { Codec *goAmino.Codec Client rpcClient.Client Height int64 NodeURI string Mode BroadcastMode TrustNode bool NonceNodeURI string JSONIndent bool ChainID string Logger log.Logger MaxGas int64 }
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) GetCodec ¶ added in v0.2.4
func (ctx CLIContext) GetCodec() (*goAmino.Codec, error)
func (CLIContext) GetHeight ¶ added in v0.2.4
func (ctx CLIContext) GetHeight() int64
func (CLIContext) GetLogger ¶ added in v0.2.4
func (ctx CLIContext) GetLogger() log.Logger
func (CLIContext) GetMaxGas ¶ added in v0.2.4
func (ctx CLIContext) GetMaxGas() int64
func (CLIContext) GetMode ¶ added in v0.2.4
func (ctx CLIContext) GetMode() int64
func (CLIContext) GetNonceNodeURI ¶ added in v0.2.4
func (ctx CLIContext) GetNonceNodeURI() string
func (CLIContext) IsJSONIndent ¶ added in v0.2.4
func (ctx CLIContext) IsJSONIndent() bool
func (CLIContext) IsTrustNode ¶ added in v0.2.4
func (ctx CLIContext) IsTrustNode() bool
func (CLIContext) JSONResult ¶ added in v0.2.4
func (ctx CLIContext) JSONResult(obj interface{}) ([]byte, error)
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) WithBroadcastMode ¶ added in v0.2.4
func (ctx CLIContext) WithBroadcastMode(mode string) CLIContext
func (CLIContext) WithChainID ¶ added in v0.2.4
func (ctx CLIContext) WithChainID(chainID string) CLIContext
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 *goAmino.Codec) CLIContext
WithCodec returns a copy of the context with an updated codec.
func (CLIContext) WithHeight ¶ added in v0.2.4
func (ctx CLIContext) WithHeight(height int64) CLIContext
func (CLIContext) WithIndent ¶ added in v0.2.4
func (ctx CLIContext) WithIndent(indent bool) CLIContext
func (CLIContext) WithLogger ¶ added in v0.2.4
func (ctx CLIContext) WithLogger(logger log.Logger) CLIContext
func (CLIContext) WithMaxGas ¶ added in v0.2.4
func (ctx CLIContext) WithMaxGas(maxGas int64) CLIContext
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.