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 parents fields #1199

Merged
merged 2 commits into from
Sep 12, 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
17 changes: 12 additions & 5 deletions bindings/python/iota_sdk/types/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ class Block:

Attributes:
protocol_version: The protocol version with which this block was issued.
parents: The parents of this block.
strong_parents: Blocks that are strongly directly approved.
weak_parents: Blocks that are weakly directly approved.
shallow_like_parents: Blocks that are directly referenced to adjust opinion.
burned_mana: The amount of Mana the Account identified by the IssuerId is at most willing to burn for this block.
payload: The optional payload of this block.
"""

protocol_version: int
parents: List[HexStr]
strong_parents: List[HexStr]
weak_parents: List[HexStr]
shallow_like_parents: List[HexStr]
burned_mana: str
payload: Optional[TaggedDataPayload |
TransactionPayload] = None
Expand Down Expand Up @@ -87,7 +90,9 @@ class BlockMetadata:

Attributes:
block_id: The id of the block.
parents: The parents of the block.
strong_parents: Blocks that are strongly directly approved.
weak_parents: Blocks that are weakly directly approved.
shallow_like_parents: Blocks that are directly referenced to adjust opinion.
is_solid: Whether the block is solid.
referenced_by_milestone_index: The milestone index referencing the block.
milestone_index: The milestone index if the block contains a milestone payload.
Expand All @@ -97,7 +102,9 @@ class BlockMetadata:
should_reattach: Whether the block should be reattached.
"""
block_id: HexStr
parents: List[HexStr]
strong_parents: List[HexStr]
weak_parents: List[HexStr]
shallow_like_parents: List[HexStr]
is_solid: bool
referenced_by_milestone_index: Optional[int] = None
milestone_index: Optional[int] = None
Expand Down
4 changes: 3 additions & 1 deletion bindings/python/iota_sdk/types/block_builder_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ class BlockBuilderOptions:
custom_remainder_address: Optional[str] = None
tag: Optional[HexStr] = None
data: Optional[HexStr] = None
parents: Optional[List[HexStr]] = None
strong_parents: Optional[List[HexStr]] = None
weak_parents: Optional[List[HexStr]] = None
shallow_like_parents: Optional[List[HexStr]] = None
burn: Optional[Burn] = None
Loading
Loading