Transaction

class blocksci.Tx

Class representing a transaction in a block

block

The block that this transaction was in

block_height

The height of the block that this transaction was in

change_output

If the change address in this transaction can be determined via the fresh address criteria, return it. Otherwise return None.

fee

The fee paid by this transaction

fee_per_byte

The ratio of fee paid to size in bytes of this transaction

hash

The 256-bit hash of this transaction

index

The internal index of this transaction

ins

A list of the inputs of the transaction

is_change_over

Returns true if this transaction contained all inputs of one address type and all outputs of a different type

is_coinbase

Return’s true if this transaction is a Coinbase transaction

is_coinjoin

Uses basic structural features to quickly decide whether this transaction might be a JoinMarket coinjoin transaction

is_definite_coinjoin

This function uses subset matching in order to determine whether this transaction is a JoinMarket coinjoin. If maxDepth != 0, it limits the total number of possible subsets the algorithm will check.

is_keyset_change

Returns true if this transaction contains distinct addresses which share some of the same keys, indicating that the access control structure has changed

is_script_deanon

Returns true if this transaction’s change address is deanonymized by the script types involved

locktime

The locktime of this transasction

num_ins

The number of inputs this transaction has

num_outs

The number of outputs this transaction has

op_return

If this transaction included a null data script, return its output. Otherwise return None

outs

A list of the outputs of the transaction

size

The size of this transaction in bytes

tx_with_hash(*args, **kwargs)

Overloaded function.

  1. tx_with_hash(arg0: blocksci.blocksci_interface.uint256) -> Optional[blocksci.blocksci_interface.Tx]
  2. tx_with_hash(arg0: str) -> Optional[blocksci.blocksci_interface.Tx]
tx_with_index(arg0: int) → blocksci.blocksci_interface.Tx

This functions gets the transaction with given index.

Parameters:index (int) – The index of the transation.
Returns:Tx
txes_with_hashes(arg0: List[str]) → List[blocksci.blocksci_interface.Tx]
value_in

The sum of the value of all of the inputs

value_out

The sum of the value of all of the outputs