Blockchain

class blocksci.Blockchain(loc)

Class representing the blockchain. This class is contructed by passing it a string representing a file path to your BlockSci data files generated by blocksci_parser

__getitem__(*args, **kwargs)

Overloaded function.

  1. __getitem__(self: blocksci.blocksci_interface.Blockchain, arg0: int) -> blocksci::Block

Return the block of the given height

  1. __getitem__(self: blocksci.blocksci_interface.Blockchain, arg0: slice) -> list

Return a list of blocks with their heights in the given range

__iter__(self: blocksci.blocksci_interface.Blockchain) → iterator

Allows direct iteration over the blocks in the blockchain

__len__(self: blocksci.blocksci_interface.Blockchain) → int

Returns the total number of blocks in the blockchain

change_script_type_txes(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: int) → List[blocksci::Transaction]

Return a list of transaction for which is_change_over returns true

coinjoin_txes(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: int) → List[blocksci::Transaction]

Returns a list of all transactions that might be JoinMarket coinjoin transactions

filter_blocks(filterFunc, start=None, end=None, cpu_count=4)

Return all blocks in range which match the given criteria

filter_txes(filterFunc, start=None, end=None, cpu_count=4)

Return all transactions in range which match the given criteria

heights_to_dates(df)
keyset_change_txes(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: int) → List[blocksci::Transaction]

Return a list of transaction for which is_keyset_change returns true

map_blocks(blockFunc, start=None, end=None, cpu_count=4)

Runs the given function over each block in range and returns a list of the results

mapreduce_block_ranges(chain, mapFunc, reduceFunc, init, start=None, end=None, cpu_count=4)

Initialized multithreaded map reduce function over a stream of block ranges

mapreduce_blocks(chain, mapFunc, reduceFunc, init, start=None, end=None, cpu_count=4)

Initialized multithreaded map reduce function over a stream of blocks

mapreduce_txes(chain, mapFunc, reduceFunc, init, start=None, end=None, cpu_count=4)

Initialized multithreaded map reduce function over a stream of transactions

possible_coinjoin_txes(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: float, arg2: int) → Tuple[List[blocksci::Transaction], List[blocksci::Transaction]]

Returns a list of all transactions that might be coinjoin transactions

range(start, end=None)
script_deanon_txes(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: int) → List[blocksci::Transaction]

Return a list of transaction for which is_script_deanon returns true

script_type_txes(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: int, arg2: blocksci.blocksci_interface.address_type) → List[blocksci::Transaction]

Returns a list of all transactions that include outputs of the given script type

segment(self: blocksci.blocksci_interface.Blockchain, arg0: int, arg1: int, arg2: int) → List[List[blocksci::Block]]

Divide the blockchain into the given number of chunks with roughly the same number of transactions in each