Documentation ¶
Index ¶
- Constants
- func AddKeyCommand() *cobra.Command
- func ExportKeyCommand() *cobra.Command
- func ImportKeyCommand() *cobra.Command
- func ListKeysCmd() *cobra.Command
- func ParseAddressCommand() *cobra.Command
- func ShowKeysCmd() *cobra.Command
- type KeyOutput
- func MkAccKeyOutput(k *keyring.Record) (KeyOutput, error)
- func MkAccKeysOutput(records []*keyring.Record) ([]KeyOutput, error)
- func MkConsKeyOutput(k *keyring.Record) (KeyOutput, error)
- func MkValKeyOutput(k *keyring.Record) (KeyOutput, error)
- func NewKeyOutput(name string, keyType keyring.KeyType, a sdk.Address, pk cryptotypes.PubKey) (KeyOutput, error)
Constants ¶
const ( OutputFormatText = "text" OutputFormatJSON = "json" )
available output formats.
const ( // FlagAddress is the flag for the user's address on the command line. FlagAddress = "address" // FlagEip55Address is the flag for the user's EIP address on the command line. FlagEip55Address = "eip-address" // FlagPublicKey represents the user's public key on the command line. FlagPublicKey = "pubkey" // FlagBechPrefix defines a desired Bech32 prefix encoding for a key. FlagBechPrefix = "bech" // FlagDevice indicates that the information should be shown in the device FlagDevice = "device" )
Variables ¶
This section is empty.
Functions ¶
func AddKeyCommand ¶
AddKeyCommand defines a keys command to add a generated or recovered private key to keybase.
func ExportKeyCommand ¶
ExportKeyCommand exports private keys from the key store.
func ImportKeyCommand ¶
func ParseAddressCommand ¶
func ShowKeysCmd ¶
ShowKeysCmd shows key information for a given key name.
Types ¶
type KeyOutput ¶
type KeyOutput struct { Name string `json:"name" yaml:"name"` Type string `json:"type" yaml:"type"` Eip55Address string `json:"eip55_address,omitempty" yaml:"eip55_address,omitempty"` Address string `json:"address" yaml:"address"` PubKey string `json:"pubkey" yaml:"pubkey"` Mnemonic string `json:"mnemonic,omitempty" yaml:"mnemonic,omitempty"` }
KeyOutput defines a structure wrapping around an Info object used for output functionality.
func MkAccKeyOutput ¶
MkAccKeyOutput create a KeyOutput in with "acc" Bech32 prefixes. If the public key is a multisig public key, then the threshold and constituent public keys will be added.
func MkAccKeysOutput ¶
MkAccKeysOutput returns a slice of KeyOutput objects, each with the "acc" Bech32 prefixes, given a slice of Info objects. It returns an error if any call to MkKeyOutput fails.
func MkConsKeyOutput ¶
MkConsKeyOutput create a KeyOutput in with "cons" Bech32 prefixes.
func MkValKeyOutput ¶
MkValKeyOutput create a KeyOutput in with "val" Bech32 prefixes.