remerkleable package¶
Submodules¶
remerkleable.basic module¶
remerkleable.bitfields module¶
- class remerkleable.bitfields.BitsView(backing: Node | None = None, hook: Callable[[HV], None] | None = None, **kwargs)[source]¶
Bases:
BackedView
,Sequence
- Return type:
- class remerkleable.bitfields.Bitvector(*args, **kwargs)[source]¶
Bases:
BitsView
,FixedByteLengthViewHelper
remerkleable.byte_vector module¶
remerkleable.complex module¶
- class remerkleable.complex.ComplexView(backing: Node | None = None, hook: Callable[[HV], None] | None = None, **kwargs)[source]¶
Bases:
SubtreeView
- class remerkleable.complex.Container(*args, backing: Node | None = None, hook: Callable[[HV], None] | None = None, append_nodes: List[Node] | None = None, **kwargs)[source]¶
Bases:
_ContainerBase
- Return type:
- class remerkleable.complex.List(*args, backing: Node | None = None, hook: Callable[[HV], None] | None = None, **kwargs)[source]¶
Bases:
MonoSubtreeView
- class remerkleable.complex.MonoSubtreeView(backing: Node | None = None, hook: Callable[[HV], None] | None = None, **kwargs)[source]¶
Bases:
Sequence
,ComplexView
- Return type:
remerkleable.core module¶
- class remerkleable.core.BackedView(backing: Node | None = None, hook: Callable[[HV], None] | None = None, **kwargs)[source]¶
Bases:
View
- class remerkleable.core.BasicView(*args, **kwargs)[source]¶
Bases:
FixedByteLengthViewHelper
,Protocol
remerkleable.history module¶
- remerkleable.history.get_target_history(history, target)[source]¶
Fetch an ordered, keyed, history of nodes at the given target. The sequential equal values are reduced into a single value, and keyed by the first occurrence. This is done efficiently by first comparing the top of the tree,
de-duplicating, and then recursively going deeper into the tree.
- Parameters:
- Return type:
- Returns:
the target values, keyed by the keys of the top nodes the target values first occurred in.
remerkleable.subtree module¶
remerkleable.test_impl module¶
remerkleable.test_typing module¶
remerkleable.tree module¶
Bases:
RuntimeError
- class remerkleable.tree.PairNode(left, right)[source]¶
Bases:
RebindableNode
,Node
An optimized, with lazily-computed root, a node that references two child nodes.
- class remerkleable.tree.RootNode(root)[source]¶
Bases:
Node
An optimized root-holding node. To check if a Node functions as node without children, use node.is_leaf(), since there may be more classes implementing non-child node behavior.
- property root: Root¶
- remerkleable.tree.get_diff(a, b)[source]¶
Iterate over the changes of b, not common with a. Left-to-right order. Returns (a,b) tuples that can’t be diffed deeper.