Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): add mana allotment type #1225

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions bindings/python/iota_sdk/types/mana.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 IOTA Stiftung
# SPDX-License-Identifier: Apache-2.0

@json
@dataclass
class ManaAllotment:
"""An allotment of Mana which will be added upon commitment of the slot in which the containing transaction was issued,
in the form of Block Issuance Credits to the account.

Attributes:
account_id: The unique identifier of the account.
mana: The alloted amount of mana.
"""
account_id: HexStr
mana: str
1 change: 0 additions & 1 deletion bindings/python/iota_sdk/types/network_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
class NetworkInfo:
"""Network related information.
"""

protocol_parameters: NodeInfoProtocol
1 change: 0 additions & 1 deletion bindings/python/iota_sdk/types/node_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ class NodeInfo:
base_token: Information about the base token.
features: List of features supported by the node.
"""

name: str
version: str
status: NodeInfoStatus
Expand Down
1 change: 0 additions & 1 deletion bindings/python/iota_sdk/types/output_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class OutputData():
remainder: Whether the output represents a remainder amount.
chain: A list of chain state indexes.
"""

output_id: HexStr
metadata: OutputMetadata
output: AccountOutput | FoundryOutput | NftOutput | BasicOutput
Expand Down
2 changes: 2 additions & 0 deletions bindings/python/iota_sdk/types/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from iota_sdk.types.output import BasicOutput, AccountOutput, FoundryOutput, NftOutput
from iota_sdk.types.input import UtxoInput
from iota_sdk.types.unlock import SignatureUnlock, ReferenceUnlock
from iota_sdk.types.mana import ManaAllotment


class PayloadType(IntEnum):
Expand All @@ -37,6 +38,7 @@ class RegularTransactionEssence(TransactionEssence):
inputs_commitment: HexStr
inputs: List[UtxoInput]
outputs: List[AccountOutput | FoundryOutput | NftOutput | BasicOutput]
allotments: List[ManaAllotment]
payload: Optional[TaggedDataPayload] = None
type: int = field(default_factory=lambda: 1, init=False)

Expand Down
Loading