Versions in this module Expand all Collapse all v1 v1.1.0 Sep 30, 2020 v1.0.0 Aug 7, 2020 Changes in this version + func PubKeyFromBytes(pubKeyBytes []byte) (pubKey crypto.PubKey, err error) + func RegisterCodec(cdc *codec.Codec) + type AES struct + func (AES) Decrypt(cryptoText string, key string) (string, error) + func (AES) Encrypt(text string, key string) (string, error) + type Crypto interface + Decrypt func(data string, password string) (string, error) + Encrypt func(data string, password string) (string, error) + type FileDAO struct + func (f FileDAO) Delete(name, password string) error + func (f FileDAO) Has(name string) bool + func (f FileDAO) Read(name, password string) (KeyInfo, error) + func (f FileDAO) Write(name, password string, info KeyInfo) error + type Info interface + GetAlgo func() hd.PubKeyType + GetName func() string + GetPath func() (*hd.BIP44Params, error) + GetPubKey func() crypto.PubKey + GetType func() KeyType + type KeyDAO interface + Delete func(name, password string) error + Has func(name string) bool + Read func(name, password string) (KeyInfo, error) + Write func(name, password string, store KeyInfo) error + func NewFileDAO(dir string) KeyDAO + func NewLevelDB(rootDir string, crypto Crypto) (KeyDAO, error) + type KeyInfo struct + Algo string + Name string + PrivKeyArmor string + PubKey []byte + type KeyType uint + const TypeLocal + type LevelDBDAO struct + func (k LevelDBDAO) Delete(name, password string) error + func (k LevelDBDAO) Has(name string) bool + func (k LevelDBDAO) Read(name, password string) (store KeyInfo, err error) + func (k LevelDBDAO) ReadMetadata(name string) (store KeyInfo, err error) + func (k LevelDBDAO) Write(name, password string, info KeyInfo) error + type MemoryDAO struct + func NewMemory(crypto Crypto) MemoryDAO + func (m MemoryDAO) Delete(name, password string) error + func (m MemoryDAO) Has(name string) bool + func (m MemoryDAO) Read(name, password string) (KeyInfo, error) + func (m MemoryDAO) ReadMetadata(name string) (store KeyInfo, err error) + func (m MemoryDAO) Write(name, password string, store KeyInfo) error