Skip to content

Commit

Permalink
stub
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Nov 7, 2024
1 parent c0eba9f commit e6833f2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
21 changes: 13 additions & 8 deletions wheel/generate_type_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,22 +390,27 @@ def derive_child_sk_unhardened(sk: PrivateKey, index: int) -> PrivateKey: ...
@staticmethod
def derive_child_pk_unhardened(pk: G1Element, index: int) -> G1Element: ...
@final
class Node:
class InternalNode:
@property
def parent(self) -> Optional[uint32]: ...
@property
def hash(self) -> bytes: ...
# TODO: this all needs reviewed and tidied
@property
def specific(self) -> Union: ...
@property
def left(self) -> uint32: ...
@property
def right(self) -> uint32: ...
@final
class LeafNode:
@property
def parent(self) -> Optional[uint32]: ...
@property
def hash(self) -> bytes: ...
@property
def key(self) -> int64: ...
@property
Expand All @@ -428,10 +433,10 @@ def __init__(
def insert(self, key: int64, value: int64, hash: bytes32, reference_kid: Optional[int64] = None, side: Optional[uint8] = None) -> None: ...
def delete(self, key: int64) -> None: ...
def get_raw_node(self, index: uint32) -> Node: ...
def get_raw_node(self, index: uint32) -> Union[InternalNode, LeafNode]: ...
def calculate_lazy_hashes(self) -> None: ...
def get_lineage_with_indexes(self, index: uint32) -> list[tuple[uint32, Node]]:...
def get_nodes_with_indexes(self) -> list[Node]: ...
def get_lineage_with_indexes(self, index: uint32) -> list[tuple[uint32, Union[InternalNode, LeafNode]]]:...
def get_nodes_with_indexes(self) -> list[Union[InternalNode, LeafNode]]: ...
def empty(self) -> bool: ...
def get_root_hash(self) -> bytes32: ...
def batch_insert(self, keys_values: list[tuple[int64, int64]], hashes: list[bytes32]): ...
Expand Down
21 changes: 13 additions & 8 deletions wheel/python/chia_rs/chia_rs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,27 @@ class AugSchemeMPL:
@staticmethod
def derive_child_pk_unhardened(pk: G1Element, index: int) -> G1Element: ...


@final
class Node:
class InternalNode:
@property
def parent(self) -> Optional[uint32]: ...
@property
def hash(self) -> bytes: ...

# TODO: this all needs reviewed and tidied
@property
def specific(self) -> Union: ...

@property
def left(self) -> uint32: ...
@property
def right(self) -> uint32: ...


@final
class LeafNode:
@property
def parent(self) -> Optional[uint32]: ...
@property
def hash(self) -> bytes: ...

@property
def key(self) -> int64: ...
@property
Expand All @@ -159,10 +164,10 @@ class MerkleBlob:

def insert(self, key: int64, value: int64, hash: bytes32, reference_kid: Optional[int64] = None, side: Optional[uint8] = None) -> None: ...
def delete(self, key: int64) -> None: ...
def get_raw_node(self, index: uint32) -> Node: ...
def get_raw_node(self, index: uint32) -> Union[InternalNode, LeafNode]: ...
def calculate_lazy_hashes(self) -> None: ...
def get_lineage_with_indexes(self, index: uint32) -> list[tuple[uint32, Node]]:...
def get_nodes_with_indexes(self) -> list[Node]: ...
def get_lineage_with_indexes(self, index: uint32) -> list[tuple[uint32, Union[InternalNode, LeafNode]]]:...
def get_nodes_with_indexes(self) -> list[Union[InternalNode, LeafNode]]: ...
def empty(self) -> bool: ...
def get_root_hash(self) -> bytes32: ...
def batch_insert(self, keys_values: list[tuple[int64, int64]], hashes: list[bytes32]): ...
Expand Down

0 comments on commit e6833f2

Please sign in to comment.