Documentation ¶
Index ¶
- func BroadcastTxRequest(cliCtx context.CLIContext, cdc *codec.Codec) http.HandlerFunc
- func EncodeTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc
- func GetBroadcastCommand(codec *amino.Codec) *cobra.Command
- func GetEncodeCommand(codec *amino.Codec) *cobra.Command
- func QueryTxCmd(cdc *codec.Codec) *cobra.Command
- func QueryTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc
- func QueryTxsByTagsRequestHandlerFn(cliCtx context.CLIContext, cdc *codec.Codec) http.HandlerFunc
- func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec)
- func SearchTxCmd(cdc *codec.Codec) *cobra.Command
- func SearchTxs(cliCtx context.CLIContext, cdc *codec.Codec, tags []string, page, limit int) ([]sdk.TxResponse, error)
- func ValidateTxResult(cliCtx context.CLIContext, resTx *ctypes.ResultTx) error
- type BroadcastReq
- type EncodeReq
- type EncodeResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastTxRequest ¶ added in v0.25.0
func BroadcastTxRequest(cliCtx context.CLIContext, cdc *codec.Codec) http.HandlerFunc
BroadcastTxRequest implements a tx broadcasting handler that is responsible for broadcasting a valid and signed tx to a full node. The tx can be broadcasted via a sync|async|block mechanism.
func EncodeTxRequestHandlerFn ¶ added in v0.33.0
func EncodeTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc
EncodeTxRequestHandlerFn returns the encode tx REST handler. In particular, it takes a json-formatted transaction, encodes it to the Amino wire protocol, and responds with base64-encoded bytes.
func GetBroadcastCommand ¶ added in v0.33.0
GetBroadcastCommand returns the tx broadcast command.
func GetEncodeCommand ¶ added in v0.33.0
GetEncodeCommand returns the encode command to take a JSONified transaction and turn it into Amino-serialized bytes
func QueryTxCmd ¶ added in v0.2.0
QueryTxCmd implements the default command for a tx query.
func QueryTxRequestHandlerFn ¶ added in v0.16.0
func QueryTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc
QueryTxRequestHandlerFn implements a REST handler that queries a transaction by hash in a committed block.
func QueryTxsByTagsRequestHandlerFn ¶ added in v0.34.0
func QueryTxsByTagsRequestHandlerFn(cliCtx context.CLIContext, cdc *codec.Codec) http.HandlerFunc
QueryTxsByTagsRequestHandlerFn implements a REST handler that searches for transactions by tags.
func RegisterRoutes ¶ added in v0.2.0
register REST routes
func SearchTxCmd ¶ added in v0.2.0
SearchTxCmd returns a command to search through tagged transactions.
func SearchTxs ¶ added in v0.28.1
func SearchTxs(cliCtx context.CLIContext, cdc *codec.Codec, tags []string, page, limit int) ([]sdk.TxResponse, error)
SearchTxs performs a search for transactions for a given set of tags via Tendermint RPC. It returns a slice of Info object containing txs and metadata. An error is returned if the query fails.
func ValidateTxResult ¶ added in v0.25.0
func ValidateTxResult(cliCtx context.CLIContext, resTx *ctypes.ResultTx) error
ValidateTxResult performs transaction verification.
Types ¶
type BroadcastReq ¶ added in v0.33.0
BroadcastReq defines a tx broadcasting request.
type EncodeResp ¶ added in v0.33.0
type EncodeResp struct {
Tx string `json:"tx"`
}
EncodeResp defines a tx encoding response.