Documentation ¶
Index ¶
- func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request)
- func CreateAddr(t *testing.T, name, password string, kb crkeys.Keybase) (sdk.AccAddress, string)
- func CreateAddrs(t *testing.T, kb crkeys.Keybase, numAddrs int) (addrs []sdk.AccAddress, seeds, names, passwords []string)
- func GetConfig() *tmcfg.Config
- func GetKeyBase(t *testing.T) crkeys.Keybase
- func InitializeTestLCD(t *testing.T, nValidators int, initAddrs []sdk.AccAddress) (cleanup func(), valConsPubKeys []crypto.PubKey, valOperAddrs []sdk.ValAddress, ...)
- func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc
- func Request(t *testing.T, port, method, path string, payload []byte) (*http.Response, string)
- func ServeCommand(cdc *codec.Codec) *cobra.Command
- type AddrSeed
- type AddrSeedSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CLIVersionRequestHandler ¶
func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request)
cli version REST handler endpoint
func CreateAddr ¶
CreateAddr adds an address to the key store and returns an address and seed. It also requires that the key could be created.
func CreateAddrs ¶
func CreateAddrs(t *testing.T, kb crkeys.Keybase, numAddrs int) (addrs []sdk.AccAddress, seeds, names, passwords []string)
CreateAddr adds multiple address to the key store and returns the addresses and associated seeds in lexographical order by address. It also requires that the keys could be created.
func GetKeyBase ¶
GetKeyBase returns the LCD test keybase. It also requires that a directory could be made and a keybase could be fetched.
NOTE: memDB cannot be used because the request is expecting to interact with the default location.
func InitializeTestLCD ¶
func InitializeTestLCD( t *testing.T, nValidators int, initAddrs []sdk.AccAddress, ) (cleanup func(), valConsPubKeys []crypto.PubKey, valOperAddrs []sdk.ValAddress, port string)
InitializeTestLCD starts Tendermint and the LCD in process, listening on their respective sockets where nValidators is the total number of validators and initAddrs are the accounts to initialize with some steak tokens. It returns a cleanup function, a set of validator public keys, and a port.
func NodeVersionRequestHandler ¶
func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc
connected node version REST handler endpoint
Types ¶
type AddrSeed ¶
type AddrSeed struct { Address sdk.AccAddress Seed string Name string Password string }
Type that combines an Address with the pnemonic of the private key to that address
type AddrSeedSlice ¶
type AddrSeedSlice []AddrSeed
implement `Interface` in sort package.
func (AddrSeedSlice) Len ¶
func (b AddrSeedSlice) Len() int
func (AddrSeedSlice) Less ¶
func (b AddrSeedSlice) Less(i, j int) bool
Sorts lexographically by Address
func (AddrSeedSlice) Swap ¶
func (b AddrSeedSlice) Swap(i, j int)