server

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCoinKey

func GenerateCoinKey() (crypto.Address, string, error)

GenerateCoinKey returns the address of a public key, along with the secret phrase to recover the private key. You can give coins to this address and return the recovery phrase to the user to access them.

func GetGenesisJSON

func GetGenesisJSON(pubkey, chainID, denom, addr string, options string) string

GetGenesisJSON returns a new tendermint genesis with Basecoin app_options that grant a large amount of "mycoin" to a single address TODO: A better UX for generating genesis files

func InitCmd

func InitCmd(gen GenOptions, logger log.Logger) *cobra.Command

InitCmd will initialize all files for tendermint, along with proper app_options. The application can pass in a function to generate proper options. And may want to use GenerateCoinKey to create default account(s).

func StartCmd

func StartCmd(app appGenerator, logger log.Logger) *cobra.Command

StartCmd runs the service passed in, either stand-alone, or in-process with tendermint

func UnsafeResetAllCmd

func UnsafeResetAllCmd(logger log.Logger) *cobra.Command

UnsafeResetAllCmd - extension of the tendermint command, resets initialization

Types

type GenOptions

type GenOptions func(args []string) (json.RawMessage, error)

GenOptions can parse command-line and flag to generate default app_options for the genesis file. This is application-specific

type GenesisDoc

type GenesisDoc map[string]json.RawMessage

GenesisDoc involves some tendermint-specific structures we don't want to parse, so we just grab it into a raw object format, so we can add one line.

Jump to

Keyboard shortcuts

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