code: def generate_keypair(crypto, seed, password=None):
      
      if crypto in ['eth', 'etc']:
          raise CurrencyNotSupported("Ethereums not yet supported")
  
      pub_byte, priv_byte = get_magic_bytes(crypto)
      priv = sha256(seed)
      pub = privtopub(priv)
  
      priv_wif = encode_privkey(priv, 'wif_compressed', vbyte=priv_byte)
      if password:
          # pycrypto etc. must be installed or this will raise ImportError, hence inline import.
          from .bip38 import Bip38EncryptedPrivateKey
          priv_wif = str(Bip38EncryptedPrivateKey.encrypt(crypto, priv_wif, password))
  
      compressed_pub = encode_pubkey(pub, 'hex_compressed')
      ret = {
          'public': {
              'hex_uncompressed': pub,
              'hex': compressed_pub,
              'address': pubtoaddr(compressed_pub, pub_byte)
          },
          'private': {
              'wif': priv_wif
          }
      }
      if not password:
          # only these are valid when no bip38 password is supplied
          ret['private']['hex'] = encode_privkey(priv, 'hex_compressed', vbyte=priv_byte)
          ret['private']['hex_uncompressed'] = encode_privkey(priv, 'hex', vbyte=priv_byte)
          ret['private']['wif_uncompressed'] = encode_privkey(priv, 'wif', vbyte=priv_byte)
  
      return ret
docs: Generate a private key and publickey for any currency, given a seed.
      That seed can be random, or a brainwallet phrase.