Skip to content

Commit

Permalink
and the .pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jan 10, 2025
1 parent 011a54a commit 687670f
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion wheel/python/chia_rs/datalayer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int
from typing_extensions import Self
from chia.types.blockchain_format.program import Program as ChiaProgram

class FailedLoadingMetadataError(Exception): ...
class FailedLoadingNodeError(Exception): ...
class InvalidBlobLengthError(Exception): ...
class KeyAlreadyPresentError(Exception): ...
class UnableToInsertAsRootOfNonEmptyTreeError(Exception): ...
class UnableToFindALeafError(Exception): ...
class UnknownKeyError(Exception): ...
class IntegrityKeyNotInCacheError(Exception): ...
class IntegrityKeyToIndexCacheIndexError(Exception): ...
class IntegrityParentChildMismatchError(Exception): ...
class IntegrityKeyToIndexCacheLengthError(Exception): ...
class IntegrityUnmatchedChildParentRelationshipsError(Exception): ...
class IntegrityTotalNodeCountError(Exception): ...
class ZeroLengthSeedNotAllowedError(Exception): ...
class BlockIndexOutOfRangeError(Exception): ...
class NodeNotALeafError(Exception): ...
class StreamingError(Exception): ...
class IndexIsNotAChildError(Exception): ...
class CycleFoundError(Exception): ...
class BlockIndexOutOfBoundsError(Exception): ...


@final
class InternalNode:
@property
Expand Down Expand Up @@ -60,4 +82,28 @@ class MerkleBlob:
def __len__(self) -> int: ...

# TODO: i would rather not specify this at all
__all__: Sequence[str] = ["InternalNode", "LeafNode", "MerkleBlob"]
__all__: Sequence[str] = [
"InternalNode",
"LeafNode",
"MerkleBlob",
"FailedLoadingMetadataError",
"FailedLoadingNodeError",
"InvalidBlobLengthError",
"KeyAlreadyPresentError",
"UnableToInsertAsRootOfNonEmptyTreeError",
"UnableToFindALeafError",
"UnknownKeyError",
"IntegrityKeyNotInCacheError",
"IntegrityKeyToIndexCacheIndexError",
"IntegrityParentChildMismatchError",
"IntegrityKeyToIndexCacheLengthError",
"IntegrityUnmatchedChildParentRelationshipsError",
"IntegrityTotalNodeCountError",
"ZeroLengthSeedNotAllowedError",
"BlockIndexOutOfRangeError",
"NodeNotALeafError",
"StreamingError",
"IndexIsNotAChildError",
"CycleFoundError",
"BlockIndexOutOfBoundsError",
]

0 comments on commit 687670f

Please sign in to comment.