def decode_address(self, document): assert document["_type"] == "address" address = Address(document['_id'], self.converter) address.miningCount = document["miningCount"] for txM in document['tx_mining']: address.tx_mining.append(self.getTransaction(txM)) for txP in document['tx_payment']: address.tx_payment.append(self.getTransaction(txP)) for txC in document['tx_credit']: address.tx_credit.append(self.getTransaction(txC)) address.totBitCoinMined = document['totBitCoinMined'] address.totDollarMined = document['totDollarMined'] address.currentBitCoin = document['currentBitCoin'] address.totFees = document['totFees'] return address