cosmos-sdk: Index | Files

package rest

import ""


Package Files

broadcast.go decode.go encode.go query.go rest.go


const (
    MethodGet = "GET"

REST query and parameter values

func BroadcastTxRequest Uses

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

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 EncodeTxRequestHandlerFn Uses

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

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

query accountREST Handler

func QueryTxRequestHandlerFn Uses

func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

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

func QueryTxsRequestHandlerFn Uses

func QueryTxsRequestHandlerFn(clientCtx client.Context) 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 RegisterRoutes Uses

func RegisterRoutes(clientCtx client.Context, r *mux.Router, storeName string)

RegisterRoutes registers the auth module REST routes.

func RegisterTxRoutes Uses

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

RegisterTxRoutes registers all transaction routes on the provided router.

type BroadcastReq Uses

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

BroadcastReq defines a tx broadcasting request.

type DecodeReq Uses

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

DecodeReq defines a tx decoding request.

type DecodeResp Uses

type DecodeResp authtypes.StdTx

DecodeResp defines a tx decoding response.

type EncodeResp Uses

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

EncodeResp defines a tx encoding response.

Package rest imports 13 packages (graph) and is imported by 13 packages. Updated 2020-07-10. Refresh now. Tools for package owners.