diff --git a/bindings/python/iota_sdk/types/feature.py b/bindings/python/iota_sdk/types/feature.py index 24a9cc56ef..842c012837 100644 --- a/bindings/python/iota_sdk/types/feature.py +++ b/bindings/python/iota_sdk/types/feature.py @@ -19,12 +19,14 @@ class FeatureType(IntEnum): Metadata (2): The metadata feature. Tag (3): The tag feature. BlockIssuer (4): The block issuer feature. + Staking (5): The staking feature. """ Sender = 0 Issuer = 1 Metadata = 2 Tag = 3 BlockIssuer = 4 + Staking = 5 @json @@ -38,7 +40,7 @@ class Feature(): @json @dataclass class SenderFeature(Feature): - """Sender feature. + """Identifies the validated sender of an output. Attributes: address: A given sender address. """ @@ -52,7 +54,7 @@ class SenderFeature(Feature): @json @dataclass class IssuerFeature(Feature): - """Issuer feature. + """Identifies the validated issuer of the UTXO state machine. Attributes: address: A given issuer address. """ @@ -66,7 +68,7 @@ class IssuerFeature(Feature): @json @dataclass class MetadataFeature(Feature): - """Metadata feature. + """Defines metadata, arbitrary binary data, that will be stored in the output. Attributes: data: Some hex encoded metadata. """ @@ -80,7 +82,7 @@ class MetadataFeature(Feature): @json @dataclass class TagFeature(Feature): - """Tag feature. + """Makes it possible to tag outputs with an index, so they can be retrieved through an indexer API. Attributes: tag: A hex encoded tag used to index the output. """ @@ -91,7 +93,7 @@ class TagFeature(Feature): @json @dataclass class BlockIssuer(Feature): - """Block issuer feature. + """Contains the public keys to verify block signatures and allows for unbonding the issuer deposit. Attributes: expiry_slot: The slot index at which the Block Issuer Feature expires and can be removed. public_keys: The Block Issuer Keys. @@ -104,3 +106,25 @@ class BlockIssuer(Feature): default_factory=lambda: int( FeatureType.BlockIssuer), init=False) + + +@json +@dataclass +class StakingFeature(Feature): + """Stakes IOTA coins to become eligible for committee selection, validate the network and receive Mana rewards. + Attributes: + staked_amount: The amount of IOTA coins that are locked and staked in the containing account. + fixed_cost: The fixed cost of the validator, which it receives as part of its Mana rewards. + start_epoch: The epoch index in which the staking started. + end_epoch: The epoch index in which the staking ends. + """ + staked_amount: str + fixed_cost: str + # TODO Replace with an EpochIndex type + start_epoch: HexStr + # TODO Replace with an EpochIndex type + end_epoch: HexStr + type: int = field( + default_factory=lambda: int( + FeatureType.Staking), + init=False)