neo.Core.TX.Transaction¶
Below are the details of the neo.Core.TX.Transaction
module
- Description:
- Transaction Basic Class
- Usage:
- from neo.Core.Transaction import Transaction
-
class
neo.Core.TX.Transaction.
Transaction
(inputs=None, outputs=None, attributes=None, scripts=None)[source]¶ -
-
static
DeserializeFrom
(reader)[source]¶ Deserialize full object.
Parameters: reader (neo.IO.BinaryReader) – Returns: Return type: Transaction
-
static
DeserializeFromBufer
(buffer, offset=0)[source]¶ Deserialize object instance from the specified buffer.
Parameters: - buffer (bytes, bytearray, BytesIO) – (Optional) data to create the stream from.
- offset – UNUSED
Returns: Return type:
-
DeserializeUnsigned
(reader)[source]¶ Deserialize object.
Parameters: reader (neo.IO.BinaryReader) – Raises: Exception
– if transaction type is incorrect.
-
DeserializeUnsignedWithoutType
(reader)[source]¶ Deserialize object without reading transaction type data.
Parameters: reader (neo.IO.BinaryReader) –
-
GetScriptHashesForVerifying
(snapshot=None)[source]¶ Get a list of script hashes for verifying transactions.
Raises: Exception
– if there are no valid assets in the transaction.ValueError
– if a snapshot object is not provided for regular transactions. RawTx is exempt from this check.
Returns: of UInt160 type script hashes.
Return type: list
-
GetTransactionResults
()[source]¶ Get the execution results of the transaction.
Returns: if the transaction has no references. list: of TransactionResult objects. Return type: None
-
Hash
¶ Get the hash of the transaction.
Returns: Return type: UInt256
-
References
¶ Get all references.
Returns: Key (UInt256): input PrevHash Value (TransactionOutput): object. Return type: dict
-
Scripts
¶ Get the scripts
Returns: Return type: list
-
ToJson
()[source]¶ Convert object members to a dictionary that can be parsed as JSON.
Returns: Return type: dict
-
static
-
class
neo.Core.TX.Transaction.
TransactionInput
(prevHash=None, prevIndex=None)[source]¶ docstring for TransactionInput
-
class
neo.Core.TX.Transaction.
TransactionOutput
(AssetId=None, Value=None, script_hash=None)[source]¶ docstring for TransactionOutput
-
Address
¶ Get the public address of the transaction.
Returns: base58 encoded string representing the address. Return type: str
-
AddressBytes
¶ Get the public address of the transaction.
Returns: base58 encoded address. Return type: bytes
-