const ( // FlagAddress is the flag for the user's address on the command line. FlagAddress = "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" )
const ( OutputFormatText = "text" OutputFormatJSON = "json" )
available output formats.
const ( // DefaultKeyPass contains the default key password for genesis transactions DefaultKeyPass = "12345678" )
KeysCdc defines codec to be used with key operations
AddKeyCommand defines a keys command to add a generated or recovered private key to keybase.
Commands registers a sub-tree of commands to interact with local private key storage.
DeleteKeyCommand deletes a key from the key store.
ExportKeyCommand exports private keys from the key store.
ImportKeyCommand imports private keys from a keyfile.
ListKeysCmd lists all keys in the key store.
MigrateCommand migrates key information from legacy keybase to OS secret store.
MnemonicKeyCommand computes the bip39 memonic for input entropy.
func NewLegacyKeyBaseFromDir(rootDir string, opts ...cryptokeyring.KeybaseOption) (cryptokeyring.LegacyKeybase, error)
NewLegacyKeyBaseFromDir initializes a legacy keybase at the rootDir directory. Keybase options can be applied when generating this new Keybase.
ParseKeyStringCommand parses an address from hex to bech32 and vice versa.
- bip39 mnemonic - bip39 passphrase - bip44 path - local encryption password
- armor encrypted private key (saved to file)
ShowKeysCmd shows key information for a given key name.
AddNewKey request a new key
NewAddNewKey constructs a new AddNewKey request structure.
DeleteKeyReq requests deleting a key
NewDeleteKeyReq constructs a new DeleteKeyReq structure.
RecoverKeyBody recovers a key
NewRecoverKey constructs a new RecoverKey request structure.
UpdateKeyReq requests updating a key
NewUpdateKeyReq constructs a new UpdateKeyReq structure.