rest

package
v0.0.0-...-8551cdf Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 14 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 DecodeMsgRequestHandlerFn

func DecodeMsgRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func DecodeTxRequestHandlerFn

func DecodeTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

DecodeTxRequestHandlerFn returns the decode tx REST handler. In particular, it takes base64-decoded bytes, decodes it from the Amino wire protocol, and responds with a json-formatted transaction.

func EncodeMsgRequestHandlerFn

func EncodeMsgRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

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 QueryTxRequestHandlerFn

func QueryTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func QueryTxsRequestHandlerFn

func QueryTxsRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

QueryTxsHandlerFn 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 RegisterTxRoutes

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

RegisterTxRoutes registers all transaction routes on the provided router.

Types

type BroadcastReq

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

BroadcastReq defines a tx broadcasting request.

type DecodeReq

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

DecodeReq defines a tx decoding request.

type DecodeResp

type DecodeResp types.StdTx

DecodeResp defines a tx decoding response.

type MsgEncodeResp

type MsgEncodeResp struct {
	Msg string `json:"msg" yaml:"msg"`
}

type TxEncodeResp

type TxEncodeResp struct {
	Tx string `json:"tx" yaml:"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