def __init__(self, block_height, num_tx_total, pct_tx_with_sendback_reuse, 
              pct_tx_with_history_reuse):
     validate.check_int_and_die(block_height, 'block_height', '__init__')
     validate.check_int_and_die(num_tx_total, 'num_tx_total', '__init__')
     validate.check_float_and_die(pct_tx_with_sendback_reuse, 
                                  'pct_tx_with_sendback_reuse', '__init__')
     validate.check_float_and_die(pct_tx_with_history_reuse,
                                  'pct_tx_with_history_reuse', '__init__')
     
     self.block_height = int(block_height)
     self.num_tx_total = int(num_tx_total)
     self.pct_tx_with_sendback_reuse = DECIMAL_FORMAT.format(
         pct_tx_with_sendback_reuse)
     self.pct_tx_with_history_reuse = DECIMAL_FORMAT.format(
         pct_tx_with_history_reuse)
     self.party_label_to_pct_sendback_map = dict()
     self.party_label_to_pct_history_map  = dict()
     self.top_reuser_labels = []
    def __init__(self, block_height, num_tx_total, pct_tx_with_sendback_reuse,
                 pct_tx_with_history_reuse):
        validate.check_int_and_die(block_height, 'block_height', '__init__')
        validate.check_int_and_die(num_tx_total, 'num_tx_total', '__init__')
        validate.check_float_and_die(pct_tx_with_sendback_reuse,
                                     'pct_tx_with_sendback_reuse', '__init__')
        validate.check_float_and_die(pct_tx_with_history_reuse,
                                     'pct_tx_with_history_reuse', '__init__')

        self.block_height = int(block_height)
        self.num_tx_total = int(num_tx_total)
        self.pct_tx_with_sendback_reuse = DECIMAL_FORMAT.format(
            pct_tx_with_sendback_reuse)
        self.pct_tx_with_history_reuse = DECIMAL_FORMAT.format(
            pct_tx_with_history_reuse)
        self.party_label_to_pct_sendback_map = dict()
        self.party_label_to_pct_history_map = dict()
        self.top_reuser_labels = []
 def get_tx_for_address_at_offset(self, address, offset):
     validate.check_address_and_die(address, THIS_FILE)
     validate.check_int_and_die(offset, 'offset', THIS_FILE)
     return ("https://blockchain.info/address/%s?format=json&offset=%d%s" %
         (address, offset, self.api_key_str))
 def get_block_at_height_url(self, height):
     validate.check_int_and_die(height,'height', THIS_FILE)
     return ("https://blockchain.info/block-height/%d?format=json%s" %
         (height, self.api_key_str))
Beispiel #5
0
 def get_tx_for_address_at_offset(self, address, offset):
     validate.check_address_and_die(address, THIS_FILE)
     validate.check_int_and_die(offset, 'offset', THIS_FILE)
     return ("https://blockchain.info/address/%s?format=json&offset=%d%s" %
             (address, offset, self.api_key_str))
Beispiel #6
0
 def get_block_at_height_url(self, height):
     validate.check_int_and_die(height, 'height', THIS_FILE)
     return ("https://blockchain.info/block-height/%d?format=json%s" %
             (height, self.api_key_str))