Versions in this module Expand all Collapse all v0 v0.1.0 Jan 19, 2024 Changes in this version + const BackendFile + const BackendFileForRPC + const BackendKWallet + const BackendMemory + const BackendOS + const BackendPass + const BackendTest + const DefaultBIP39Passphrase + const Ed25519 + const MultiAlgo + const Secp256k1 + const Sr25519 + var CryptoCdc *codec.Codec + var ErrUnsupportedLanguage = errors.New("unsupported language: only english is supported") + var ErrUnsupportedSigningAlgo = errors.New("unsupported signing algo") + func CreateHDPath(account uint32, index uint32) *hd.BIP44Params + func CreateHDPathEx(cointype, account, index uint32) *hd.BIP44Params + func IsSupportedAlgorithm(supported []SigningAlgo, algo SigningAlgo) bool + func RegisterCodec(cdc *codec.Codec) + func SecpDeriveKey(mnemonic string, bip39Passphrase, hdPath string) ([]byte, error) + func SecpPrivKeyGen(bz []byte) tmcrypto.PrivKey + func StdDeriveKey(mnemonic string, bip39Passphrase, hdPath string, algo SigningAlgo) ([]byte, error) + func StdPrivKeyGen(bz []byte, algo SigningAlgo) (tmcrypto.PrivKey, error) + type DeriveKeyFunc func(mnemonic string, bip39Passphrase, hdPath string, algo SigningAlgo) ([]byte, error) + type Info interface + GetAddress func() types.AccAddress + GetAlgo func() SigningAlgo + GetName func() string + GetPath func() (*hd.BIP44Params, error) + GetPubKey func() crypto.PubKey + GetType func() KeyType + func NewMultiInfo(name string, pub crypto.PubKey) Info + type KeyOutput struct + Address string + EthAddress string + Mnemonic string + Name string + OperAddress 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 Keybase interface + CloseDB func() + CreateAccount func(name, mnemonic, bip39Passwd, encryptPasswd, hdPath string, algo SigningAlgo) (Info, error) + CreateLedger func(name string, algo SigningAlgo, hrp string, account, index uint32) (info Info, err error) + CreateMnemonic func(name string, language Language, passwd string, algo SigningAlgo, ...) (info Info, seed string, err error) + CreateMulti func(name string, pubkey crypto.PubKey) (info Info, err error) + CreateOffline func(name string, pubkey crypto.PubKey, algo SigningAlgo) (info Info, err error) + Delete func(name, passphrase string, skipPass bool) error + Export func(name string) (armor string, err error) + ExportPrivKey func(name, decryptPassphrase, encryptPassphrase string) (armor string, err error) + ExportPrivateKeyObject func(name string, passphrase string) (crypto.PrivKey, error) + ExportPubKey func(name string) (armor string, err error) + FileDir func() (string, error) + Get func(name string) (Info, error) + GetByAddress func(address types.AccAddress) (Info, error) + Import func(name string, armor string) (err error) + ImportPrivKey func(name, armor, passphrase string) error + ImportPubKey func(name string, armor string) (err error) + List func() ([]Info, error) + Sign func(name, passphrase string, msg []byte) ([]byte, crypto.PubKey, error) + SupportedAlgos func() []SigningAlgo + SupportedAlgosLedger func() []SigningAlgo + Update func(name, oldpass string, getNewpass func() (string, error)) error + func New(name, dir string, opts ...KeybaseOption) Keybase + func NewInMemory(opts ...KeybaseOption) Keybase + func NewKeyring(appName, backend, rootDir string, userInput io.Reader, opts ...KeybaseOption) (Keybase, error) + type KeybaseOption func(*kbOptions) + func WithDeriveFunc(f DeriveKeyFunc) KeybaseOption + func WithKeygenFunc(f PrivKeyGenFunc) KeybaseOption + func WithSupportedAlgos(algos []SigningAlgo) KeybaseOption + func WithSupportedAlgosLedger(algos []SigningAlgo) KeybaseOption + type Language int + const ChineseSimplified + const ChineseTraditional + const English + const French + const Italian + const Japanese + const Korean + const Spanish + type PrivKeyGenFunc func(bz []byte, algo SigningAlgo) (crypto.PrivKey, error) + type SigningAlgo string