mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 12:11:44 +00:00
Expose address in keyinfo, add get command
This commit is contained in:
@ -4,12 +4,21 @@ import (
|
||||
"sort"
|
||||
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
data "github.com/tendermint/go-data"
|
||||
)
|
||||
|
||||
// Info is the public information about a key
|
||||
type Info struct {
|
||||
Name string
|
||||
PubKey crypto.PubKeyS
|
||||
Name string `json:"name"`
|
||||
Address data.Bytes `json:"address"`
|
||||
PubKey crypto.PubKeyS `json:"pubkey"`
|
||||
}
|
||||
|
||||
func (i *Info) Format() Info {
|
||||
if !i.PubKey.Empty() {
|
||||
i.Address = i.PubKey.Address()
|
||||
}
|
||||
return *i
|
||||
}
|
||||
|
||||
// Infos is a wrapper to allows alphabetical sorting of the keys
|
||||
|
Reference in New Issue
Block a user