import base64

import sha3
import os

from collections import namedtuple

from cli.crypto_ed25519_sha3 import generate_keypair_ed25519_sha3, sign_ed25519_sha3


class KeyPair(namedtuple('KeyPair', ['raw_private_key', 'raw_public_key'])):
    def encode(self, value):
        return base64.b64encode(value)

    @property
    def private_key(self):
        return self.encode(self.raw_private_key)

    @property
    def public_key(self):
        return self.encode(self.raw_public_key)


def generate_keypair():
    return generate_keypair_ed25519_sha3()


def sign(key_pair, message):
    return sign_ed25519_sha3(key_pair, message)


def verify_ed25519_sha3(pub_key, sig, message):
    return verify_ed25519_sha3(pub_key, sig, message)

@@ -71,95 +71,8 @@
 le%0A%0A
-from cli.crypto_ed25519_sha3 import generate_keypair_ed25519_sha3, sign_ed25519_sha3%0A%0A%0A
 clas
@@ -390,24 +390,111 @@
 blic_key)%0A%0A%0A
+%0Afrom cli.crypto_ed25519_sha3 import generate_keypair_ed25519_sha3, sign_ed25519_sha3%0A%0A
 def generate

Fix import order of crypto