func OpenWithMnemonic(encryptedAccount Store, mnemonic string) (*KeyManager, error) {
	pw, err := scrypt.DecryptCipherText(encryptedAccount.Password, []byte(mnemonic))
	if err != nil {
		return &KeyManager{}, err
	}
	return OpenWithPassword(encryptedAccount, string(pw))
}
Open account with mnemonic.
This should only be used as a backup
package keyManager
import (
	"encoding/hex"
	"encoding/json"
	"errors"
	"fmt"
	"strconv"
	"strings"
	lp2pCrypto "github.com/libp2p/go-libp2p-crypto"
	ed25519 "golang.org/x/crypto/ed25519"
	api "github.com/Bit-Nation/panthalassa/api"
	aes "github.com/Bit-Nation/panthalassa/crypto/aes"
	scrypt "github.com/Bit-Nation/panthalassa/crypto/scrypt"
	ks "github.com/Bit-Nation/panthalassa/keyStore"
	chatMigration "github.com/Bit-Nation/panthalassa/keyStore/migration/chat"
	encryptionKeyMigration "github.com/Bit-Nation/panthalassa/keyStore/migration/encryption_key"
	ethereumMigration "github.com/Bit-Nation/panthalassa/keyStore/migration/ethereum"
	identity "github.com/Bit-Nation/panthalassa/keyStore/migration/identity"
	mnemonic "github.com/Bit-Nation/panthalassa/mnemonic"
	x3dh "github.com/Bit-Nation/x3dh"
	common "github.com/ethereum/go-ethereum/common"
	types "github.com/ethereum/go-ethereum/core/types"
	ethCrypto "github.com/ethereum/go-ethereum/crypto"
)
type KeyManager struct {
	keyStore ks.Store
	account  Store
	Api      *api.API
}
type Store struct {
	Password          scrypt.CipherText `json:"password"`
	EncryptedKeyStore scrypt.CipherText `json:"encrypted_key_store"`
	Version           uint8             `json:"version"`
}
func (s Store) Marshal() ([]byte, error) {
	return json.Marshal(s)
}
func UnmarshalStore(data []byte) (Store, error) {
	var s Store
	if err := json.Unmarshal(data, &s); err != nil {
		return Store{}, err
	}
	return s, nil
}
func OpenWithPassword(store Store, pw string) (*KeyManager, error) {
	jsonKeyStore, err := scrypt.DecryptCipherText(store.EncryptedKeyStore, []byte(pw))
	if err != nil {
		return &KeyManager{}, err
	}
	keyStore, err := ks.UnmarshalStore(string(jsonKeyStore))
	if err != nil {
		return &KeyManager{}, err
	}
	return &KeyManager{
		keyStore: keyStore,
		account:  store,
	}, nil
}