Models#
Module containing base models and functions to operate on them.
- class starknet_py.net.models.Transaction#
Starknet transaction base class.
- abstract calculate_hash(chain_id: int) int #
Calculates the transaction hash in the Starknet network - a unique identifier of the transaction. See
compute_transaction_hash()
docstring for more details.
- abstract property type: TransactionType#
Returns the corresponding TransactionType enum.
- class starknet_py.net.models.AccountTransaction#
Represents a transaction in the Starknet network that is originated from an action of an account.
- class starknet_py.net.models.DeployAccountV1#
Represents a transaction in the Starknet network that is a deployment of a Starknet account contract.
Deprecated since version 0.25.0: This class is deprecated and will be removed in future versions. Use
DeployAccountV3
instead
- class starknet_py.net.models.DeployAccountV3#
Represents a transaction in the Starknet network that is a version 3 deployment of a Starknet account contract.
- class starknet_py.net.models.DeclareV2#
Represents a transaction in the Starknet network that is a version 2 declaration of a Starknet contract class. Supports only sierra compiled contracts.
Deprecated since version 0.25.0: This class is deprecated and will be removed in future versions. Use
DeclareV3
instead.
- class starknet_py.net.models.DeclareV3#
Represents a transaction in the Starknet network that is a version 3 declaration of a Starknet contract class. Supports only sierra compiled contracts.
- class starknet_py.net.models.InvokeV1#
Represents a transaction in the Starknet network that is an invocation of a Cairo contract function.
Deprecated since version 0.25.0: This class is deprecated and will be removed in future versions. Use
InvokeV3
instead
- class starknet_py.net.models.InvokeV3#
Represents a transaction in the Starknet network that is a version 3 invocation of a Cairo contract function.
- enum starknet_py.net.models.StarknetChainId(value)#
An enumeration representing Starknet chain IDs.
- Member Type:
int
Valid values are as follows:
- MAINNET = <StarknetChainId.MAINNET: 23448594291968334>#
- SEPOLIA = <StarknetChainId.SEPOLIA: 393402133025997798000961>#
- SEPOLIA_INTEGRATION = <StarknetChainId.SEPOLIA_INTEGRATION: 31168527906619897499653851911248642653894324500842817>#