tx

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastTxRequest

func BroadcastTxRequest(cliCtx context.CLIContext) 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

func EncodeTxRequestHandlerFn(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

func GetBroadcastCommand(cdc *amino.Codec) *cobra.Command

GetBroadcastCommand returns the tx broadcast command.

func GetEncodeCommand

func GetEncodeCommand(codec *amino.Codec) *cobra.Command

GetEncodeCommand returns the encode command to take a JSONified transaction and turn it into Amino-serialized bytes

func QueryCommitTxRequestHandlerFn

func QueryCommitTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

QueryCommitTxRequestHandlerFn implements a REST handler that queries vote, sigs and tx bytes committed block.

func QuerySideTxRequestHandlerFn added in v0.1.7

func QuerySideTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

QuerySideTxRequestHandlerFn implements a REST handler that queries sigs, side-tx bytes committed block

func QueryTxCmd

func QueryTxCmd(cdc *codec.Codec) *cobra.Command

QueryTxCmd implements the default command for a tx query.

func QueryTxRequestHandlerFn

func QueryTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

QueryTxRequestHandlerFn implements a REST handler that queries a transaction by hash in a committed block.

func QueryTxsByEventsCmd

func QueryTxsByEventsCmd(cdc *codec.Codec) *cobra.Command

QueryTxsByEventsCmd returns a command to search through tagged transactions.

func QueryTxsRequestHandlerFn

func QueryTxsRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

QueryTxsRequestHandlerFn implements a REST handler that searches for transactions. Genesis transactions are returned if the height parameter is set to zero, otherwise the transactions are searched for by events.

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

RegisterRoutes registers REST routes

Types

type BroadcastReq

type BroadcastReq struct {
	Tx   authTypes.StdTx `json:"tx"`
	Mode string          `json:"mode"`
}

BroadcastReq defines a tx broadcasting request.

type EncodeReq

type EncodeReq struct {
	Tx authTypes.StdTx `json:"tx"`
}

EncodeReq defines a tx encoding request.

type EncodeResp

type EncodeResp struct {
	Tx string `json:"tx"`
}

EncodeResp defines a tx encoding response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL