Versions in this module Expand all Collapse all v0 v0.0.2 Nov 23, 2021 Changes in this version + const BackendFile + const BackendKWallet + const BackendMemory + const BackendOS + const BackendPass + const BackendTest + const DefaultBIP39Passphrase + var ErrUnsupportedLanguage = errors.New("unsupported language: only english is supported") + var ErrUnsupportedSigningAlgo = errors.New("unsupported signing algo") + func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) + func SignWithLedger(info Info, msg []byte) (sig []byte, pub types.PubKey, err error) + type DeriveKeyFunc func(mnemonic string, bip39Passphrase, hdPath string, algo hd.PubKeyType) ([]byte, error) + type Exporter interface + ExportPrivKeyArmor func(uid, encryptPassphrase string) (armor string, err error) + ExportPrivKeyArmorByAddress func(address sdk.Address, encryptPassphrase string) (armor string, err error) + ExportPubKeyArmor func(uid string) (string, error) + ExportPubKeyArmorByAddress func(address sdk.Address) (string, error) + type Importer interface + ImportPrivKey func(uid, armor, passphrase string) error + ImportPubKey func(uid string, armor string) error + type Info interface + GetAddress func() types.AccAddress + GetAlgo func() hd.PubKeyType + GetName func() string + GetPath func() (*hd.BIP44Params, error) + GetPubKey func() cryptotypes.PubKey + GetType func() KeyType + func NewMultiInfo(name string, pub cryptotypes.PubKey) Info + type InfoImporter interface + Import func(uid string, armor string) error + func NewInfoImporter(appName, backend, rootDir string, userInput io.Reader, opts ...Option) (InfoImporter, error) + type KeyOutput struct + Address string + Mnemonic string + Name string + PubKey string + PubKeys []multisigPubKeyOutput + Threshold uint + Type string + func Bech32ConsKeyOutput(keyInfo Info) (KeyOutput, error) + func Bech32KeyOutput(keyInfo Info) (KeyOutput, error) + func Bech32KeysOutput(infos []Info) ([]KeyOutput, error) + func Bech32ValKeyOutput(keyInfo Info) (KeyOutput, error) + func NewKeyOutput(name, keyType, address, pubkey string) KeyOutput + type KeyType uint + const TypeLedger + const TypeLocal + const TypeMulti + const TypeOffline + func (kt KeyType) String() string + type KeybaseOption func(*kbOptions) + type Keyring interface + Delete func(uid string) error + DeleteByAddress func(address sdk.Address) error + Key func(uid string) (Info, error) + KeyByAddress func(address sdk.Address) (Info, error) + List func() ([]Info, error) + NewAccount func(uid, mnemonic, bip39Passwd, hdPath string, algo SignatureAlgo) (Info, error) + NewMnemonic func(uid string, language Language, hdPath string, algo SignatureAlgo) (Info, string, error) + SaveLedgerKey func(uid string, algo SignatureAlgo, hrp string, coinType, account, index uint32) (Info, error) + SaveMultisig func(uid string, pubkey types.PubKey) (Info, error) + SavePubKey func(uid string, pubkey types.PubKey, algo hd.PubKeyType) (Info, error) + SupportedAlgorithms func() (SigningAlgoList, SigningAlgoList) + func New(appName, backend, rootDir string, userInput io.Reader, opts ...Option) (Keyring, error) + func NewInMemory(opts ...Option) Keyring + type Language int + const ChineseSimplified + const ChineseTraditional + const English + const French + const Italian + const Japanese + const Korean + const Spanish + type LegacyInfoImporter interface + ImportInfo func(oldInfo Info) error + type LegacyKeybase interface + Close func() error + Export func(name string) (armor string, err error) + ExportPrivKey func(name, decryptPassphrase, encryptPassphrase string) (armor string, err error) + ExportPubKey func(name string) (armor string, err error) + List func() ([]Info, error) + func NewLegacy(name, dir string, opts ...KeybaseOption) (LegacyKeybase, error) + type Option func(options *Options) + type Options struct + SupportedAlgos SigningAlgoList + SupportedAlgosLedger SigningAlgoList + type PrivKeyGenFunc func(bz []byte, algo hd.PubKeyType) (cryptotypes.PrivKey, error) + type SignatureAlgo interface + Derive func() hd.DeriveFn + Generate func() hd.GenerateFn + Name func() hd.PubKeyType + func NewSigningAlgoFromString(str string, algoList SigningAlgoList) (SignatureAlgo, error) + type Signer interface + Sign func(uid string, msg []byte) ([]byte, types.PubKey, error) + SignByAddress func(address sdk.Address, msg []byte) ([]byte, types.PubKey, error) + type SigningAlgoList []SignatureAlgo + func (sal SigningAlgoList) Contains(algo SignatureAlgo) bool + func (sal SigningAlgoList) String() string + type UnsafeExporter interface + UnsafeExportPrivKeyHex func(uid string) (string, error) + type UnsafeKeyring interface + func NewUnsafe(kr Keyring) UnsafeKeyring