def is_eos_account_available(account_name):
    c = eosapi.Client(nodes=settings.EOS_API_NODES)
    try:
        c.get_account(account_name)
        return False
    except eosapi.exceptions.HttpAPIError:
        return True
 def _get_ram_price_kb_eos():
     c = eosapi.Client(nodes=settings.EOS_API_NODES)
     x = c.get_table_rows(True, 'eosio', 'eosio', 'rammarket', 'id', 0, -1,
                          1)['rows'][0]
     base_balance = x['base']['balance'].rsplit(' ')[0]
     quote_balance = x['quote']['balance'].rsplit(' ')[0]
     return 1024 * float(quote_balance) / float(base_balance)
Exemple #3
0
 def did_registration_work(self):
     c = eosapi.Client(nodes=settings.EOS_API_NODES)
     try:
         x = c.get_account(self.account_name)
         return self.public_key == x['permissions'][0]['required_auth'][
             'keys'][0]['key']
     except eosapi.exceptions.HttpAPIError:
         return False
 def did_registration_work(self):
     c = eosapi.Client(nodes=settings.EOS_API_NODES)
     try:
         x = c.get_account(self.account_name)
         for p in x['permissions']:
             if p['perm_name'] == 'active':
                 if p['required_auth']['keys'][0]['key'] != self.active_key:
                     return False
             if p['perm_name'] == 'owner':
                 if p['required_auth']['keys'][0]['key'] != self.owner_key:
                     return False
         return True
     except eosapi.exceptions.HttpAPIError:
         return False