zknode¶
Binary tree node structure for representing parsed ZK statements.
This module provides the BinNode class used by the ZKP compiler to represent parsed zero-knowledge proof statements as a binary tree structure.
- Note:
This module is part of the experimental ZKP compiler and should be considered proof-of-concept quality.
- class zknode.BinNode(value, left=None, right=None)[source]¶
Bases:
objectBinary tree node for representing ZK proof statement components.
- Node types:
ATTR (0): Attribute/variable node (leaf)
OR (1): Logical OR node
AND (2): Logical AND node
EXP (3): Exponentiation node (^)
EQ (4): Equality node (=)
- Args:
value: Either a string (creates ATTR node) or int (creates operator node) left: Left child node (optional) right: Right child node (optional)