rest

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastRawTxRequestHandlerFn

func BroadcastRawTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

BroadcastTxRequestHandlerFn returns the broadcast tx REST handler

func BroadcastTxRawRequestHandlerFn

func BroadcastTxRawRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

BroadcastTxRequestHandlerFn returns the broadcast tx REST handler

func BroadcastTxRequestHandlerFn

func BroadcastTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

BroadcastTxRequestHandlerFn returns the broadcast tx REST handler

func CompleteAndBroadcastTxREST

func CompleteAndBroadcastTxREST(w http.ResponseWriter, cliCtx context.CLIContext,
	baseReq rest.BaseReq, password string, msgs []sdk.Msg, cdc *codec.Codec)

CompleteAndBroadcastTxREST implements a utility function that facilitates sending a series of messages in a signed tx. In addition, it will handle tx gas simulation and estimation.

NOTE: Also see CompleteAndBroadcastTxCLI.

func CreateTxRequestHandlerFn

func CreateTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

CreateTxRequestHandlerFn - http request handler to send coins to a address.

func QueryContractRequestHandlerFn added in v1.1.0

func QueryContractRequestHandlerFn(
	storeName string, cdc *codec.Codec,
	decoder auth.AccountDecoder, cliCtx context.CLIContext,
) http.HandlerFunc

query contractREST Handler

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *codec.Codec, storeName string)

RegisterRoutes - Central function to define routes that get registered by the main application

func SendTxRequestHandlerFn

func SendTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

SendTxRequestHandlerFn - http request handler to send coins to a address.

func SignTxRawRequestHandlerFn

func SignTxRawRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

sign tx REST handler

func SignTxRequestHandlerFn

func SignTxRequestHandlerFn(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

nolint: unparam sign tx REST handler

func WriteGenerateStdTxResponse

func WriteGenerateStdTxResponse(w http.ResponseWriter, cdc *codec.Codec,
	cliCtx context.CLIContext, br rest.BaseReq, msgs []sdk.Msg, encodeflag bool)

junying-todo-20190330 WriteGenerateStdTxResponse writes response for the generate only mode.

github.com/cosmos/cosmos-sdk/client/rest
WriteGenerateStdTxResponse

Types

type CreateReq

type CreateReq struct {
	BaseReq rest.BaseReq `json:"base_req"`
	To      string       `json:"to"`
	Amount  sdk.Coins    `json:"amount"`
	Encode  bool         `json:"encode"`
}

CreateReq defines the properties of a send request's body.

type SendReq

type SendReq struct {
	BaseReq rest.BaseReq `json:"base_req"`
	To      string       `json:"to"`
	Amount  sdk.Coins    `json:"amount"`
	Data    string       `json:"data"`
}

SendReq defines the properties of a send request's body.

type SignBody

type SignBody struct {
	Tx         auth.StdTx   `json:"tx"`
	BaseReq    rest.BaseReq `json:"base_req"`
	Passphrase string       `json:"passphrase"`
}

SignBody defines the properties of a sign request's body.

type SignRawBody

type SignRawBody struct {
	Tx         string `json:"tx"`
	Passphrase string `json:"passphrase"`
	Offline    bool   `json:"offline"`
	Encode     bool   `json:"encode"`
}

SignBody defines the properties of a sign request's body.

Jump to

Keyboard shortcuts

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