client

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagChainID   = "chain-id"
	FlagNode      = "node"
	FlagHeight    = "height"
	FlagTrustNode = "trust-node"
	FlagName      = "name"
)

nolint

View Source
const MinPassLength = 8

MinPassLength is the minimum acceptable password length

Variables

View Source
var LineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}}

LineBreak can be included in a command list to provide a blank line to help with readability

Functions

func BroadcastTx added in v0.11.0

func BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)

Broadcast the transaction bytes to Tendermint

func BufferStdin

func BufferStdin() *bufio.Reader

BufferStdin is used to allow reading prompts for stdin multiple times, when we read from non-tty

func GetCheckPassword

func GetCheckPassword(prompt, prompt2 string, buf *bufio.Reader) (string, error)

GetCheckPassword will prompt for a password twice to verify they match (for creating a new password). It enforces the password length. Only parses password once if input is piped in.

func GetCommands

func GetCommands(cmds ...*cobra.Command) []*cobra.Command

GetCommands adds common flags to query commands

func GetKeyBase

func GetKeyBase(db dbm.DB) keys.Keybase

GetKeyBase initializes a keybase based on the configuration

func GetNode added in v0.7.0

func GetNode() (rpcclient.Client, error)

GetNode prepares a simple rpc.Client from the flags

func GetPassword

func GetPassword(prompt string, buf *bufio.Reader) (pass string, err error)

GetPassword will prompt for a password one-time (to sign a tx) It enforces the password length

func GetSeed

func GetSeed(prompt string, buf *bufio.Reader) (seed string, err error)

GetSeed will request a seed phrase from stdin and trims off leading/trailing spaces

func MockKeyBase

func MockKeyBase() keys.Keybase

MockKeyBase generates an in-memory keybase that will be discarded useful for --dry-run to generate a seed phrase without storing the key

func PostCommands

func PostCommands(cmds ...*cobra.Command) []*cobra.Command

PostCommands adds common flags for commands to post tx

func Query added in v0.11.0

func Query(key cmn.HexBytes, storeName string) (res []byte, err error)

Query from Tendermint with the provided key and storename

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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