rest

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGet = "GET"
)

REST query and parameter values

Variables

This section is empty.

Functions

func DecodeTxRequestHandlerFn

func DecodeTxRequestHandlerFn(clientCtx client.Context) 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 QueryAccountRequestHandlerFn

func QueryAccountRequestHandlerFn(storeName string, clientCtx client.Context) http.HandlerFunc

QueryAccountRequestHandlerFn is the query accountREST Handler.

func QueryTxRequestHandlerFn

func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

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

func QueryTxsRequestHandlerFn

func QueryTxsRequestHandlerFn(clientCtx client.Context) 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(clientCtx client.Context, rtr *mux.Router, storeName string)

RegisterRoutes registers the auth module REST routes.

func RegisterTxRoutes

func RegisterTxRoutes(clientCtx client.Context, rtr *mux.Router)

RegisterTxRoutes registers all transaction routes on the provided router.

Types

type DecodeReq

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

DecodeReq defines a tx decoding request.

type DecodeResp

type DecodeResp legacytx.StdTx

DecodeResp defines a tx decoding response.

Jump to

Keyboard shortcuts

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