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.
- __getitem__(self: blocksci.blocksci_interface.Blockchain, arg0: int) -> blocksci::Block
Return the block of the given height
- __getitem__(self: blocksci.blocksci_interface.Blockchain, arg0: slice) -> List[blocksci::Block]
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
-
filter_blocks(filterFunc, start=None, end=None, cpu_count=8)¶ Return all blocks in range which match the given criteria
-
filter_txes(filterFunc, start=None, end=None, cpu_count=8)¶ Return all transactions in range which match the given criteria
-
heights_to_dates(df)¶
-
map_blocks(blockFunc, start=None, end=None, cpu_count=8)¶ 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=8)¶ Initialized multithreaded map reduce function over a stream of block ranges
-
mapreduce_blocks(chain, mapFunc, reduceFunc, init, start=None, end=None, cpu_count=8)¶ Initialized multithreaded map reduce function over a stream of blocks
-
mapreduce_txes(chain, mapFunc, reduceFunc, init, start=None, end=None, cpu_count=8)¶ Initialized multithreaded map reduce function over a stream of transactions
-
outputs_unspent¶ Returns a list of all of the outputs that are unspent
-
range(start, end=None)¶
-
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
-
scripts(self: blocksci.blocksci_interface.Blockchain, arg0: blocksci.blocksci_interface.script_type) → Union[ranges::v3::any_view<blocksci::ScriptAddress<(blocksci::ScriptType::Enum)0>, (ranges::v3::category)1, void>, ranges::v3::any_view<blocksci::ScriptAddress<(blocksci::ScriptType::Enum)1>, (ranges::v3::category)1, void>, ranges::v3::any_view<blocksci::ScriptAddress<(blocksci::ScriptType::Enum)2>, (ranges::v3::category)1, void>, ranges::v3::any_view<blocksci::ScriptAddress<(blocksci::ScriptType::Enum)3>, (ranges::v3::category)1, void>, ranges::v3::any_view<blocksci::ScriptAddress<(blocksci::ScriptType::Enum)4>, (ranges::v3::category)1, void>]¶
-
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
-