TxOut¶
-
class
riemann.tx.TxOut(value: bytes, output_script: bytes)¶ A transaction output, composed of a value (in satoshi) and an output script describing the spend conditions on the new UTXO.
Value is serialized as an 8-byte LE integer, measured in satoshi. Use the i2le_padded function in Utils to serialize integers.
TxOut accepts un-prepended output scripts, and adds their length for you.
- Parameters
value – the 8-byte LE encoded value of the output (in satoshi)
output_script – the non-length-prepended output script as a bytestring
-
value¶ the 8-byte LE encoded value of the output (in satoshi)
-
output_script¶ the non-length-prepended output script as a bytestring
-
copy(value: Optional[bytes] = None, output_script: Optional[bytes] = None) → riemann.tx.tx.TxOut¶ Make a new copy of the object with optional modifications.
-
classmethod
from_bytes(byte_string: bytes) → riemann.tx.tx.TxOut¶ Parse a TxOut from a bytestring. Also available as from_hex