rest

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DonateTxRequestHandlerFn

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

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

func RegisterRoutes

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

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

Types

type SendReq

type SendReq struct {
	BaseReq rest.BaseReq `json:"base_req"`
	Amount  sdk.Coins    `json:"amount"`
}

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

func (SendReq) GetBaseReq

func (sr SendReq) GetBaseReq() *rest.BaseReq

func (SendReq) GetMsg

func (sr SendReq) GetMsg(r *http.Request, sender sdk.AccAddress) (sdk.Msg, error)

func (SendReq) New

func (sr SendReq) New() restutil.RestReq

Jump to

Keyboard shortcuts

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