Versions in this module Expand all Collapse all v0 v0.1.0 May 17, 2022 Changes in this version + const BIP44Prefix + const BIPChange + const BIPCoinType + const BIPPurpose + const FullPath + const PartialPath + var ErrDecrypt = errors.New("could not decrypt key with given passphrase") + func ComputeMastersFromSeed(seed []byte) (secret [32]byte, chainCode [32]byte) + func DerivePrivateKeyForPath(privKeyBytes [32]byte, chainCode [32]byte, path string) ([32]byte, error) + type BIP44Params struct + func NewBinanceBIP44Params(account uint32, addressIdx uint32) *BIP44Params + func NewParams(purpose, coinType, account uint32, change bool, addressIdx uint32) *BIP44Params + func (p BIP44Params) DerivationPath() []uint32 + func (p BIP44Params) String() string + type CryptoJSON struct + Cipher string + CipherParams cipherparamsJSON + CipherText string + KDF string + KDFParams map[string]interface{} + MAC string + type EncryptedKeyJSON struct + Address string + Crypto CryptoJSON + Id string + Version int + type KeyManager interface + ExportAsKeyStore func(password string) (*EncryptedKeyJSON, error) + ExportAsMnemonic func() (string, error) + ExportAsPrivateKey func() (string, error) + GetAddr func() ctypes.AccAddress + GetPrivKey func() crypto.PrivKey + Sign func(tx.StdSignMsg) ([]byte, error) + func NewKeyManager() (KeyManager, error) + func NewKeyStoreKeyManager(file string, auth string) (KeyManager, error) + func NewLedgerKeyManager(path ledger.DerivationPath) (KeyManager, error) + func NewMnemonicKeyManager(mnemonic string) (KeyManager, error) + func NewMnemonicPathKeyManager(mnemonic, keyPath string) (KeyManager, error) + func NewPrivateKeyManager(priKey string) (KeyManager, error) + type PlainKeyJSON struct + Address string + Id string + PrivateKey string + Version int