Skip to content

Commit

Permalink
50 shades of Parents
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6323 committed Sep 11, 2023
1 parent 01e0286 commit 887088e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
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

0 comments on commit 887088e

Please sign in to comment.