utils

package
v0.5.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: Apache-2.0 Imports: 9 Imported by: ? modules, 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

View Source
const (
	Async        = "async"
	GenerateOnly = "generate-only"
)

Variables

This section is empty.

Functions

func AsyncOnlyArg

func AsyncOnlyArg(r *http.Request) bool

func GenerateOnlyArg

func GenerateOnlyArg(r *http.Request) bool

func InitRequestClictx

func InitRequestClictx(cliCtx context.CLIContext, r *http.Request, name string, signerAddress string) context.CLIContext

func PrintUnsignedStdTx

func PrintUnsignedStdTx(txCtx context.TxContext, cliCtx context.CLIContext, msgs []sdk.Msg) (err error)

PrintUnsignedStdTx builds an unsigned StdTx and prints it to os.Stdout.

func ReadPostBody

func ReadPostBody(w http.ResponseWriter, r *http.Request, cdc *wire.Codec, req interface{}) error

func SendOrPrintTx

func SendOrPrintTx(txCtx context.TxContext, cliCtx context.CLIContext, msgs []sdk.Msg) error

func SendOrReturnUnsignedTx

func SendOrReturnUnsignedTx(w http.ResponseWriter, cliCtx context.CLIContext, txCtx context.TxContext, baseTx context.BaseTx, msgs []sdk.Msg)

func WriteErrorResponse

func WriteErrorResponse(w http.ResponseWriter, status int, msg string)

WriteErrorResponse prepares and writes a HTTP error given a status code and an error message.

func WriteGenerateStdTxResponse

func WriteGenerateStdTxResponse(w http.ResponseWriter, txCtx context.TxContext, msgs []sdk.Msg)

WriteGenerateStdTxResponse writes response for the generate_only mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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