tx

package
v1.0.5 Latest Latest
Warning

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

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

Documentation

Overview

nolint

nolint

nolint

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

swagger:route POST /txs/encode txs txsEncode It Encode the transaction responses: 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

swagger:route GET /txs/{hash}/commit-proof txs txsHashCommitProof It returns the commit-proof for the transaction. 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

swagger:route GET /txs/{hash}/side-tx txs txsSideTx It returns the side-tx bytes 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

swagger:route GET /txs/{hash} txs txsByHash It returns the transaction by hash. 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

swagger:route GET /txs txs txsGET It returns the list of transaction based on page,limit and events specified. 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.

type StdTx added in v0.3.2

type StdTx struct {
	Msg       interface{} `json:"msg"`
	Signature string      `json:"signature"`
	Memo      string      `json:"memo"`
}

Jump to

Keyboard shortcuts

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