cosmos-sdk/client/keys/types.go

32 lines
806 B
Go

package keys
// used for outputting keys.Info over REST
// AddNewKey request a new key
type AddNewKey struct {
Name string `json:"name"`
Password string `json:"password"`
Mnemonic string `json:"mnemonic"`
Account int `json:"account,string,omitempty"`
Index int `json:"index,string,omitempty"`
}
// RecoverKeyBody recovers a key
type RecoverKey struct {
Password string `json:"password"`
Mnemonic string `json:"mnemonic"`
Account int `json:"account,string,omitempty"`
Index int `json:"index,string,omitempty"`
}
// UpdateKeyReq requests updating a key
type UpdateKeyReq struct {
OldPassword string `json:"old_password"`
NewPassword string `json:"new_password"`
}
// DeleteKeyReq requests deleting a key
type DeleteKeyReq struct {
Password string `json:"password"`
}