utils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

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