Tx

class blocksci.Tx

Class representing a transaction in a block

base_size

The size of the non-segwit data in bytes

Type:int
block

The block that this transaction was in

Type:blocksci.Block
block_height

The height of the block that this transaction was in

Type:int
block_time

The time that the block containing this transaction arrived

Type:datetime.datetime
change_output

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

Type:Optional[blocksci.Output]
fee

The fee paid by this transaction

Type:int
fee_per_byte(size_measure: str='virtual') → int

The ratio of fee paid to size of this transaction. By default this uses veritual size, but passing total, base, weight, or virtual let’s you choose what measure of size you want

Return type:int
hash

The 256-bit hash of this transaction

Type:blocksci.uint256
includes_output_of_type(address_type: blocksci.address_type) → bool

Check whether the given transaction includes an output of the given address type

Return type:bool
index

The internal index of this transaction

Type:int
input_count

The number of inputs this transaction has

Type:int
input_value

The sum of the value of all of the inputs

Type:int
inputs

A list of the inputs of the transaction

Type:blocksci.InputRange
ins

A list of the inputs of the transaction

Type:blocksci.InputRange
is_coinbase

Return’s true if this transaction is a Coinbase transaction

Type:bool
locktime

The locktime of this transasction

Type:int
observed_in_mempool

Returns whether this transaction was seen in the mempool by the recorder

Type:bool
op_return

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

Type:Optional[blocksci.Output]
output_count

The number of outputs this transaction has

Type:int
output_value

The sum of the value of all of the outputs

Type:int
outputs

A list of the outputs of the transaction

Type:blocksci.OutputRange
outs

A list of the outputs of the transaction

Type:blocksci.OutputRange
size_bytes

The size of this transaction in bytes

Type:int
time_seen

If recorded by the mempool recorder, the time that this transaction was first seen by your node

Type:Optional[datetime.datetime]
total_size

The size all transaction data in bytes

Type:int
virtual_size

The weight of the transaction divided by 4

Type:int
weight

Three times the base size plus the total size

Type:int