diff --git a/merkly/node.py b/merkly/node.py index 838197c..0931a19 100644 --- a/merkly/node.py +++ b/merkly/node.py @@ -13,5 +13,11 @@ class Node(BaseModel): # 🍃 Leaf of Merkle Tree """ - data: Optional[str] = None + data: Optional[bytes] = None side: Side = Side.LEFT + + def __eq__(self, other: "Node") -> bool: + return self.data == other.data + + def __repr__(self) -> str: + return f"Node({self.data.hex()}, {self.side})"