Documentation ¶
Index ¶
- Variables
- func BuildKeysCommand()
- func Call(method string, args map[string]string) (string, error)
- func Execute()
- func ExitConnectErr(err error)
- func GetKey(addr []byte) (*crypto.Key, error)
- func StartServer(host, port string) error
- func WriteError(w http.ResponseWriter, err error)
- func WriteResult(w http.ResponseWriter, result string)
- type ErrConnectionRefused
- type HTTPRequest
- type HTTPResponse
- type Manager
- func (am *Manager) GetKey(addr []byte) *crypto.Key
- func (am *Manager) KeyStore() crypto.KeyStore
- func (am *Manager) TimedUnlock(addr []byte, keyAuth string, timeout time.Duration) error
- func (am *Manager) Unlock(addr []byte, keyAuth string) error
- func (am *Manager) Update(addr []byte, authFrom, authTo string) (err error)
- type PrivValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultKeyType = "ed25519,ripemd160" DefaultDir = common.KeysPath DefaultHashType = "sha256" DefaultHost = "localhost" DefaultPort = "4767" TestPort = "7674" TestAddr = "http://" + DefaultHost + ":" + TestPort // set in before() DaemonAddr string KeysDir string KeyName string KeyAddr string KeyHost string KeyPort string //keygenCmd only NoPassword bool KeyType string //hashCmd only HashType string HexByte bool // lockCmd only UnlockTime int // minutes )
View Source
var EKeys = &cobra.Command{ Use: "eris-keys", Short: "Generate and manage keys for producing signatures", Long: "A tool for doing a bunch of cool stuff with keys.", Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
View Source
var ErrLocked = fmt.Errorf("account is locked")
Functions ¶
func BuildKeysCommand ¶
func BuildKeysCommand()
func ExitConnectErr ¶
func ExitConnectErr(err error)
func StartServer ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, err error)
func WriteResult ¶
func WriteResult(w http.ResponseWriter, result string)
Types ¶
type ErrConnectionRefused ¶
type ErrConnectionRefused string
func (ErrConnectionRefused) Error ¶
func (e ErrConnectionRefused) Error() string
type HTTPRequest ¶
A request is just a map of args to be json marshalled
type HTTPResponse ¶
dead simple response struct
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
var AccountManager *Manager
func NewManager ¶
func (*Manager) TimedUnlock ¶
TimedUnlock unlocks the account with the given address. The account stays unlocked for the duration of timeout. A timeout of 0 unlocks the account until the program exits.
If the accout is already unlocked, TimedUnlock extends or shortens the active unlock timeout.
type PrivValidator ¶
type PrivValidator struct { Address []byte `json:"address"` PubKey account.PubKeyEd25519 `json:"pub_key"` PrivKey account.PrivKeyEd25519 `json:"priv_key"` LastHeight int `json:"last_height"` LastRound int `json:"last_round"` LastStep int `json:"last_step"` }
Click to show internal directories.
Click to hide internal directories.