def generate_coin_id(self): coin_id = str(random.getrandbits(settings.coin_id_size)) coin_id = base58.b58encode(coin_id.encode()) return coin_id