Exemplo n.º 1
0
 def transactions(self):
     command = {
         "action": "account_history",
         "account": self.address,
         "count": "10"
     }
     transactions = SearchChain(command)
     return transactions.info['history']
Exemplo n.º 2
0
    def __init__(self, address):
        command = '{"action": "account_info", "account": "%s"}' % address

        search = SearchChain(command)
        self.address = address
        self.error = False
        self.openBlock = search.info['open_block']
        self.frontier = search.info['frontier']
        self.representativeBlock = search.info['representative_block']
        self.balance = raw_rai(search.info['balance'])
        self.blockCount = search.info['block_count']
Exemplo n.º 3
0
 def transactions(self):
     command = '{ "action": "account_history", "account": "%s", "count": "100"}' % self.address
     transactions = SearchChain(command)
     print(transactions.info)
     return transactions.info['history']
Exemplo n.º 4
0
 def __init__(self, block_hash):
     account = SearchChain({"action": "block_account", "hash": block_hash})
     self.account = account.info['account']
     self.hash = block_hash
Exemplo n.º 5
0
 def get_info(self):
     command = {"action": "block", "hash": self.hash}
     block = SearchChain(command)
     return block.info
Exemplo n.º 6
0
 def transactions(self):
     command = '{ "action": "account_history", "account": "%s", "count": %s}' % (
         self.address, self.blockCount)
     transactions = SearchChain(command)
     return transactions.info['history']
Exemplo n.º 7
0
 def get_info(self):
     command = '{ "action": "block", "hash": "%s" }' % self.hash
     block = SearchChain(command)
     return block.info
Exemplo n.º 8
0
def get_peers():
	command = '{ "action": "peers" }'
	search = SearchChain(command)
	return search.info