Documentation ¶
Index ¶
- Constants
- func AddNewKeyRequestHandler(w http.ResponseWriter, r *http.Request)
- func Commands() *cobra.Command
- func DeleteKeyRequestHandler(w http.ResponseWriter, r *http.Request)
- func GetKeyBase() (keys.Keybase, error)
- func GetKeyBaseFromDir(rootDir string) (keys.Keybase, error)
- func GetKeyRequestHandler(w http.ResponseWriter, r *http.Request)
- func MarshalJSON(o interface{}) ([]byte, error)
- func QueryKeysRequestHandler(w http.ResponseWriter, r *http.Request)
- func RegisterRoutes(r *mux.Router)
- func SeedRequestHandler(w http.ResponseWriter, r *http.Request)
- func SetKeyBase(kb keys.Keybase)
- func UnmarshalJSON(bz []byte, ptr interface{}) error
- func UpdateKeyRequestHandler(w http.ResponseWriter, r *http.Request)
- type DeleteKeyBody
- type KeyOutput
- type NewKeyBody
- type UpdateKeyBody
Constants ¶
View Source
const KeyDBName = "keys"
KeyDBName is the directory under root where we store the keys
Variables ¶
This section is empty.
Functions ¶
func AddNewKeyRequestHandler ¶
func AddNewKeyRequestHandler(w http.ResponseWriter, r *http.Request)
add new key REST handler
func Commands ¶
Commands registers a sub-tree of commands to interact with local private key storage.
func DeleteKeyRequestHandler ¶
func DeleteKeyRequestHandler(w http.ResponseWriter, r *http.Request)
delete key REST handler
func GetKeyBase ¶
initialize a keybase based on the configuration
func GetKeyBaseFromDir ¶ added in v0.16.0
initialize a keybase based on the configuration
func GetKeyRequestHandler ¶
func GetKeyRequestHandler(w http.ResponseWriter, r *http.Request)
get key REST handler
func QueryKeysRequestHandler ¶
func QueryKeysRequestHandler(w http.ResponseWriter, r *http.Request)
query key list REST handler
func SeedRequestHandler ¶
func SeedRequestHandler(w http.ResponseWriter, r *http.Request)
Seed REST request handler
func UnmarshalJSON ¶ added in v0.16.0
unmarshal json
func UpdateKeyRequestHandler ¶
func UpdateKeyRequestHandler(w http.ResponseWriter, r *http.Request)
update key REST handler
Types ¶
type DeleteKeyBody ¶
type DeleteKeyBody struct {
Password string `json:"password"`
}
delete key request REST body
type KeyOutput ¶
type KeyOutput struct { Name string `json:"name"` Type string `json:"type"` Address sdk.AccAddress `json:"address"` PubKey string `json:"pub_key"` Seed string `json:"seed,omitempty"` }
used for outputting keys.Info over REST
func Bech32KeyOutput ¶ added in v0.19.0
create a KeyOutput in bech32 format
type NewKeyBody ¶
type NewKeyBody struct { Name string `json:"name"` Password string `json:"password"` Seed string `json:"seed"` }
new key request REST body
type UpdateKeyBody ¶
type UpdateKeyBody struct { NewPassword string `json:"new_password"` OldPassword string `json:"old_password"` }
update key request REST body
Click to show internal directories.
Click to hide internal directories.