tx

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(cmd *cobra.Command, cdc *wire.Codec)

AddCommands adds a number of tx-query related subcommands

func BroadcastTxRequestHandlerFn added in v0.1.4

func BroadcastTxRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc

BroadcastTxRequestHandlerFn BroadcastTx REST Handler

func GetBlock added in v0.22.4

func GetBlock(ctx context.CoreContext, height *int64) (*ctypes.ResultBlock, error)

GetBlock ...

func ParseTx added in v0.22.4

func ParseTx(cdc *wire.Codec, txBytes []byte) (auth.StdTx, error)

ParseTx ...

func QueryTx added in v0.22.4

func QueryTx(cdc *wire.Codec, ctx context.CoreContext, hashHexStr string, trustNode bool) ([]byte, error)

QueryTx ...

func QueryTxCmd

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

QueryTxCmd Get the default command for a tx query

func QueryTxRequestHandlerFn added in v0.1.4

func QueryTxRequestHandlerFn(cdc *wire.Codec, ctx context.CoreContext) http.HandlerFunc

QueryTxRequestHandlerFn transaction query REST handler

func RegisterRoutes

func RegisterRoutes(ctx context.CoreContext, r *mux.Router, cdc *wire.Codec)

RegisterRoutes register REST routes

func SearchTxCmd

func SearchTxCmd(cdc *wire.Codec) *cobra.Command

SearchTxCmd default client command to search through tagged transactions

func SearchTxRequestHandlerFn added in v0.1.4

func SearchTxRequestHandlerFn(ctx context.CoreContext, cdc *wire.Codec) http.HandlerFunc

SearchTxRequestHandlerFn Search Tx REST Handler

func SignTxRequstHandler

func SignTxRequstHandler(w http.ResponseWriter, r *http.Request)

SignTxRequstHandler sign transaction REST Handler

Types

type BroadcastTxBody

type BroadcastTxBody struct {
	TxBytes string `json:"tx"`
}

BroadcastTxBody Broadcast Body

type SignTxBody

type SignTxBody struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	TxBytes  string `json:"tx"`
}

SignTxBody REST request body TODO does this need to be exposed?

type TxInfo added in v0.22.4

type TxInfo struct {
	Hash   common.HexBytes        `json:"hash"`
	Height int64                  `json:"height"`
	Tx     sdk.Tx                 `json:"tx"`
	Result abci.ResponseDeliverTx `json:"result"`
	Time   int64                  `json:"time"`
}

TxInfo is used to prepare info to display

func FormatTxResult added in v0.22.4

func FormatTxResult(cdc *wire.Codec, res *ctypes.ResultTx) (TxInfo, error)

FormatTxResult ...

func FormatTxResults added in v0.22.4

func FormatTxResults(cdc *wire.Codec, res []*ctypes.ResultTx) ([]TxInfo, error)

FormatTxResults ...

Jump to

Keyboard shortcuts

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