diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7110562d8..60ba4ee95 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] env: stubtest_args: ${{ matrix.python-version == '3.11' && '--allowlist wheel/stubtest.allowlist.3-11-plus' || ''}} diff --git a/.github/workflows/build-riscv64.yml b/.github/workflows/build-riscv64.yml index 57708ccf3..b38051c97 100644 --- a/.github/workflows/build-riscv64.yml +++ b/.github/workflows/build-riscv64.yml @@ -54,8 +54,6 @@ jobs: matrix: os: [ubuntu-latest] python: - - major-dot-minor: "3.8" - matrix: "3.8" - major-dot-minor: "3.9" matrix: "3.9" - major-dot-minor: "3.10" diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 27fd6a386..d704aac77 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -41,18 +41,6 @@ jobs: runs-on: intel: [windows-latest] python: - - major-dot-minor: "3.8" - cibw-build: "cp38-*" - by-arch: - arm: - manylinux-version: 2_28 - docker-url: ghcr.io/chia-network/build-images/centos-pypa-rust-aarch64 - rustup-target: aarch64-unknown-linux-musl - intel: - manylinux-version: 2_28 - docker-url: ghcr.io/chia-network/build-images/centos-pypa-rust-x86_64 - rustup-target: x86_64-unknown-linux-musl - matrix: "3.8" - major-dot-minor: "3.9" cibw-build: "cp39-*" by-arch: @@ -235,8 +223,8 @@ jobs: arm: [Linux, ARM64] intel: [ubuntu-latest] python: - - major-dot-minor: "3.8" - matrix: "3.8" + - major-dot-minor: "3.9" + matrix: "3.9" arch: - name: Intel matrix: intel diff --git a/Cargo.toml b/Cargo.toml index 0abbf15dc..78ff09b43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,6 +117,11 @@ clvm-traits = { path = "./crates/clvm-traits", version = "0.15.0" } clvm-utils = { path = "./crates/clvm-utils", version = "0.15.0" } clvm-derive = { path = "./crates/clvm-derive", version = "0.13.0" } chia-fuzz = { path = "./crates/chia-consensus/fuzz", version = "0.15.0" } +chia-bls-fuzz = { path = "./crates/chia-bls/fuzz", version = "0.15.0" } +chia-protocol-fuzz = { path = "./crates/chia-protocol/fuzz", version = "0.15.0" } +chia-puzzles-fuzz = { path = "./crates/chia-puzzles/fuzz", version = "0.15.0" } +clvm-traits-fuzz = { path = "./crates/clvm-traits/fuzz", version = "0.15.0" } +clvm-utils-fuzz = { path = "./crates/clvm-utils/fuzz", version = "0.15.0" } blst = { version = "0.3.12", features = ["portable"] } clvmr = "0.9.0" syn = "2.0.75" diff --git a/README.md b/README.md index 19884df0c..1fc76308a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A collection of Rust crates for working with the Chia blockchain. There are also ## Prerequisites -- [Python](https://www.python.org/downloads/) 3.8 or higher installed. +- [Python](https://www.python.org/downloads/) 3.9 or higher installed. - The [Rust toolchain](https://rustup.rs/) must be installed. ## Unit Tests diff --git a/bump-version.py b/bump-version.py index 511b7021b..70f2382fd 100644 --- a/bump-version.py +++ b/bump-version.py @@ -7,7 +7,7 @@ import re import sys from pathlib import Path -from typing import Callable, Set +from typing import Callable v = sys.argv[1] tag = sys.argv[2] @@ -31,7 +31,7 @@ "crates/clvm-utils/fuzz", ] -def crates_with_changes() -> Set[str]: +def crates_with_changes() -> set[str]: ret = set() for c in our_crates: diff = os.popen(f"git diff {tag} -- {c}").read().strip() @@ -42,7 +42,7 @@ def crates_with_changes() -> Set[str]: ret.add("wheel") return ret -def update_cargo(name: str, crates: Set[str]) -> None: +def update_cargo(name: str, crates: set[str]) -> None: subst = "" with open(f"{name}/Cargo.toml") as f: for line in f: diff --git a/crates/chia-tools/parse-analyze-chain.py b/crates/chia-tools/parse-analyze-chain.py index dc290acfc..98d7576ef 100644 --- a/crates/chia-tools/parse-analyze-chain.py +++ b/crates/chia-tools/parse-analyze-chain.py @@ -1,6 +1,5 @@ -from typing import Dict, List -all_counters: Dict[str, List[int]] = {} +all_counters: dict[str, list[int]] = {} keys = ["atoms:", "small_atoms:", diff --git a/tests/merkle_set.py b/tests/merkle_set.py index e71ffad9e..02ac234a9 100644 --- a/tests/merkle_set.py +++ b/tests/merkle_set.py @@ -2,7 +2,7 @@ from abc import ABCMeta, abstractmethod from hashlib import sha256 -from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple +from typing import TYPE_CHECKING, Any, Iterable, Optional from chia_rs.sized_bytes import bytes32 @@ -47,7 +47,7 @@ BLANK = bytes32([0] * 32) -prehashed: Dict[bytes, _Hash] = {} +prehashed: dict[bytes, _Hash] = {} def init_prehashed() -> None: @@ -105,17 +105,17 @@ def add(self, toadd: bytes, depth: int) -> Node: pass @abstractmethod - def is_included(self, tocheck: bytes, depth: int, p: List[bytes]) -> bool: + def is_included(self, tocheck: bytes, depth: int, p: list[bytes]) -> bool: pass @abstractmethod def other_included( - self, tocheck: bytes, depth: int, p: List[bytes], collapse: bool + self, tocheck: bytes, depth: int, p: list[bytes], collapse: bool ) -> None: pass @abstractmethod - def _audit(self, hashes: List[bytes], bits: List[int]) -> None: + def _audit(self, hashes: list[bytes], bits: list[int]) -> None: pass @@ -133,13 +133,13 @@ def get_root(self) -> bytes32: def add_already_hashed(self, toadd: bytes) -> None: self.root = self.root.add(toadd, 0) - def is_included_already_hashed(self, tocheck: bytes) -> Tuple[bool, bytes]: - proof: List[bytes] = [] + def is_included_already_hashed(self, tocheck: bytes) -> tuple[bool, bytes]: + proof: list[bytes] = [] r = self.root.is_included(tocheck, 0, proof) return r, b"".join(proof) - def _audit(self, hashes: List[bytes]) -> None: - newhashes: List[bytes] = [] + def _audit(self, hashes: list[bytes]) -> None: + newhashes: list[bytes] = [] self.root._audit(newhashes, []) assert newhashes == sorted(newhashes) @@ -169,16 +169,16 @@ def is_double(self) -> bool: def add(self, toadd: bytes, depth: int) -> Node: return TerminalNode(toadd) - def is_included(self, tocheck: bytes, depth: int, p: List[bytes]) -> bool: + def is_included(self, tocheck: bytes, depth: int, p: list[bytes]) -> bool: p.append(EMPTY) return False def other_included( - self, tocheck: bytes, depth: int, p: List[bytes], collapse: bool + self, tocheck: bytes, depth: int, p: list[bytes], collapse: bool ) -> None: p.append(EMPTY) - def _audit(self, hashes: List[bytes], bits: List[int]) -> None: + def _audit(self, hashes: list[bytes], bits: list[int]) -> None: pass @@ -189,14 +189,14 @@ def _make_middle(children: Any, depth: int) -> Node: cbits = [get_bit(child.hash, depth) for child in children] if cbits[0] != cbits[1]: return MiddleNode(children) - nextvals: List[Node] = [_empty, _empty] + nextvals: list[Node] = [_empty, _empty] nextvals[cbits[0] ^ 1] = _empty nextvals[cbits[0]] = _make_middle(children, depth + 1) return MiddleNode(nextvals) class TerminalNode(Node): - def __init__(self, hash: bytes, bits: Optional[List[int]] = None) -> None: + def __init__(self, hash: bytes, bits: Optional[list[int]] = None) -> None: assert len(hash) == 32 self.hash = hash if bits is not None: @@ -222,23 +222,23 @@ def add(self, toadd: bytes, depth: int) -> Node: else: return _make_middle([TerminalNode(toadd), self], depth) - def is_included(self, tocheck: bytes, depth: int, p: List[bytes]) -> bool: + def is_included(self, tocheck: bytes, depth: int, p: list[bytes]) -> bool: p.append(TERMINAL + self.hash) return tocheck == self.hash def other_included( - self, tocheck: bytes, depth: int, p: List[bytes], collapse: bool + self, tocheck: bytes, depth: int, p: list[bytes], collapse: bool ) -> None: p.append(TERMINAL + self.hash) - def _audit(self, hashes: List[bytes], bits: List[int]) -> None: + def _audit(self, hashes: list[bytes], bits: list[int]) -> None: hashes.append(self.hash) for pos, v in enumerate(bits): assert get_bit(self.hash, pos) == v class MiddleNode(Node): - def __init__(self, children: List[Node]): + def __init__(self, children: list[Node]): self.children = children if children[0].is_empty() and children[1].is_double(): self.hash = children[1].hash @@ -285,7 +285,7 @@ def add(self, toadd: bytes, depth: int) -> Node: newvals[bit] = newchild return MiddleNode(newvals) - def is_included(self, tocheck: bytes, depth: int, p: List[bytes]) -> bool: + def is_included(self, tocheck: bytes, depth: int, p: list[bytes]) -> bool: p.append(MIDDLE) if get_bit(tocheck, depth) == 0: r = self.children[0].is_included(tocheck, depth + 1, p) @@ -300,14 +300,14 @@ def is_included(self, tocheck: bytes, depth: int, p: List[bytes]) -> bool: return self.children[1].is_included(tocheck, depth + 1, p) def other_included( - self, tocheck: bytes, depth: int, p: List[bytes], collapse: bool + self, tocheck: bytes, depth: int, p: list[bytes], collapse: bool ) -> None: if collapse or not self.is_double(): p.append(TRUNCATED + self.hash) else: self.is_included(tocheck, depth, p) - def _audit(self, hashes: List[bytes], bits: List[int]) -> None: + def _audit(self, hashes: list[bytes], bits: list[int]) -> None: self.children[0]._audit(hashes, bits + [0]) self.children[1]._audit(hashes, bits + [1]) @@ -331,15 +331,15 @@ def is_double(self) -> bool: def add(self, toadd: bytes, depth: int) -> Node: return self - def is_included(self, tocheck: bytes, depth: int, p: List[bytes]) -> bool: + def is_included(self, tocheck: bytes, depth: int, p: list[bytes]) -> bool: raise SetError() def other_included( - self, tocheck: bytes, depth: int, p: List[bytes], collapse: bool + self, tocheck: bytes, depth: int, p: list[bytes], collapse: bool ) -> None: p.append(TRUNCATED + self.hash) - def _audit(self, hashes: List[bytes], bits: List[int]) -> None: + def _audit(self, hashes: list[bytes], bits: list[int]) -> None: pass @@ -378,7 +378,7 @@ def deserialize_proof(proof: bytes) -> MerkleSet: raise SetError() -def _deserialize(proof: bytes, pos: int, bits: List[int]) -> Tuple[Node, int]: +def _deserialize(proof: bytes, pos: int, bits: list[int]) -> tuple[Node, int]: t = proof[pos : pos + 1] # flake8: noqa if t == EMPTY: return _empty, pos + 1 diff --git a/tests/run_gen.py b/tests/run_gen.py index 5a28ce643..4099a1118 100755 --- a/tests/run_gen.py +++ b/tests/run_gen.py @@ -13,7 +13,7 @@ from time import time import sys from time import perf_counter -from typing import Optional, Tuple +from typing import Optional DEFAULT_CONSTANTS = ConsensusConstants( SLOT_BLOCKS_TARGET=uint32(32), @@ -87,7 +87,7 @@ def run_gen( fn: str, flags: int = 0, args: Optional[str] = None, version: int = 1 -) -> Tuple[Optional[int], Optional[SpendBundleConditions], float]: +) -> tuple[Optional[int], Optional[SpendBundleConditions], float]: # constants from the main chia blockchain: # https://github.com/Chia-Network/chia-blockchain/blob/main/chia/consensus/default_constants.py diff --git a/tests/test_additions_and_removals.py b/tests/test_additions_and_removals.py index 13d8ff53b..ee3cc4091 100644 --- a/tests/test_additions_and_removals.py +++ b/tests/test_additions_and_removals.py @@ -1,4 +1,4 @@ -from typing import Set, Optional, Tuple +from typing import Optional from chia_rs import ( additions_and_removals, ALLOW_BACKREFS, @@ -39,8 +39,8 @@ def test_additions_and_removals() -> None: if "FAILED: " in test_file: continue - expected_additions: Set[Tuple[str, str, str, Optional[str]]] = set() - expected_removals: Set[Tuple[str, str]] = set() + expected_additions: set[tuple[str, str, str, Optional[str]]] = set() + expected_removals: set[tuple[str, str]] = set() last_coin_id = "" for l in test_file.splitlines(): if "- coin id: " in l: @@ -62,7 +62,7 @@ def test_additions_and_removals() -> None: assert len(removals) == len(expected_removals) for add in additions: - addition: Tuple[str, str, str, Optional[str]] + addition: tuple[str, str, str, Optional[str]] if add[1] is not None: addition = ( f"{add[0].parent_coin_info}", diff --git a/tests/test_block_record_fidelity.py b/tests/test_block_record_fidelity.py index ec1b3afad..e37ec5ef2 100644 --- a/tests/test_block_record_fidelity.py +++ b/tests/test_block_record_fidelity.py @@ -1,4 +1,4 @@ -from typing import List, Optional, Any, Callable +from typing import Optional, Any, Callable import sys import time @@ -46,9 +46,9 @@ def get_optional(rng: Random, gen: Callable[[Random], Any]) -> Optional[Any]: return gen(rng) -def get_list(rng: Random, gen: Callable[[Random], Any]) -> List[Any]: +def get_list(rng: Random, gen: Callable[[Random], Any]) -> list[Any]: length = rng.sample([0, 1, 5, 32, 500], 1)[0] - ret: List[Any] = [] + ret: list[Any] = [] for i in range(length): ret.append(gen(rng)) return ret diff --git a/tests/test_blscache.py b/tests/test_blscache.py index 35fda7619..570b6f3a8 100644 --- a/tests/test_blscache.py +++ b/tests/test_blscache.py @@ -14,7 +14,6 @@ ) from chia_rs.sized_bytes import bytes32 from chia_rs.sized_ints import uint8, uint16, uint32, uint64, uint128 -from typing import List from chia.util.hash import std_hash from chia.util.lru_cache import LRUCache from chia.types.blockchain_format.program import Program as ChiaProgram @@ -103,8 +102,8 @@ def test_instantiation() -> None: pk: G1Element = sk.get_g1() msg = b"hello" sig: G2Element = AugSchemeMPL.sign(sk, msg) - pks: List[G1Element] = [pk] - msgs: List[bytes] = [msg] + pks: list[G1Element] = [pk] + msgs: list[bytes] = [msg] result = bls_cache.aggregate_verify(pks, msgs, sig) assert result assert bls_cache.len() == 1 @@ -131,9 +130,9 @@ def test_cache_limit() -> None: sk: PrivateKey = AugSchemeMPL.key_gen(seed) pk: G1Element = sk.get_g1() - pks: List[G1Element] = [] - msgs: List[bytes] = [] - sigs: List[G2Element] = [] + pks: list[G1Element] = [] + msgs: list[bytes] = [] + sigs: list[G2Element] = [] for i in [0xCAFE, 0xF00D, 0xABCD, 0x1234]: msgs.append(i.to_bytes(8, byteorder="little")) pks.append(pk) diff --git a/tests/test_blspy_fidelity.py b/tests/test_blspy_fidelity.py index 8e89a1dd4..7ab01755d 100644 --- a/tests/test_blspy_fidelity.py +++ b/tests/test_blspy_fidelity.py @@ -2,7 +2,7 @@ import chia_rs from random import getrandbits import sys -from typing import Any, Type +from typing import Any import pytest from concurrent.futures import ThreadPoolExecutor diff --git a/tests/test_merkle_set.py b/tests/test_merkle_set.py index 08034a285..bdfef9e45 100644 --- a/tests/test_merkle_set.py +++ b/tests/test_merkle_set.py @@ -1,4 +1,4 @@ -from typing import List, Optional, Any, Callable, Protocol, Tuple +from typing import Optional, Any, Callable, Protocol from hashlib import sha256 import sys @@ -35,7 +35,7 @@ def check_proof( assert confirm_not_included_already_hashed(root, item, proof) -def check_tree(leafs: List[bytes32]) -> None: +def check_tree(leafs: list[bytes32]) -> None: ru_tree = RustMerkleSet(leafs) py_tree = PythonMerkleSet(leafs) @@ -118,14 +118,14 @@ def h2(a: bytes, b: bytes) -> bytes32: return bytes32(sha256(a + b).digest()) -def hashdown(t: List[int], buf: bytes) -> bytes32: +def hashdown(t: list[int], buf: bytes) -> bytes32: return bytes32(sha256(bytes([0] * 30) + bytes(t) + buf).digest()) BLANK = h("0000000000000000000000000000000000000000000000000000000000000000") -def merkle_tree_5() -> Tuple[bytes32, List[bytes32]]: +def merkle_tree_5() -> tuple[bytes32, list[bytes32]]: a = h("5800000000000000000000000000000000000000000000000000000000000000") b = h("2300000000000000000000000000000000000000000000000000000000000000") c = h("2100000000000000000000000000000000000000000000000000000000000000") @@ -164,7 +164,7 @@ def merkle_tree_5() -> Tuple[bytes32, List[bytes32]]: # e c -def merkle_tree_left_edge() -> Tuple[bytes32, List[bytes32]]: +def merkle_tree_left_edge() -> tuple[bytes32, list[bytes32]]: a = h("8000000000000000000000000000000000000000000000000000000000000000") b = h("0000000000000000000000000000000000000000000000000000000000000001") c = h("0000000000000000000000000000000000000000000000000000000000000002") @@ -196,7 +196,7 @@ def merkle_tree_left_edge() -> Tuple[bytes32, List[bytes32]]: # c d -def merkle_tree_left_edge_duplicates() -> Tuple[bytes32, List[bytes32]]: +def merkle_tree_left_edge_duplicates() -> tuple[bytes32, list[bytes32]]: a = h("8000000000000000000000000000000000000000000000000000000000000000") b = h("0000000000000000000000000000000000000000000000000000000000000001") c = h("0000000000000000000000000000000000000000000000000000000000000002") @@ -230,7 +230,7 @@ def merkle_tree_left_edge_duplicates() -> Tuple[bytes32, List[bytes32]]: # c d -def merkle_tree_right_edge() -> Tuple[bytes32, List[bytes32]]: +def merkle_tree_right_edge() -> tuple[bytes32, list[bytes32]]: a = h("4000000000000000000000000000000000000000000000000000000000000000") b = h("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") c = h("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe") @@ -262,7 +262,7 @@ def merkle_tree_right_edge() -> Tuple[bytes32, List[bytes32]]: # c b -def merkle_set_test_cases() -> List[Tuple[bytes32, List[bytes32]]]: +def merkle_set_test_cases() -> list[tuple[bytes32, list[bytes32]]]: a = h("7000000000000000000000000000000000000000000000000000000000000000") b = h("7100000000000000000000000000000000000000000000000000000000000000") c = h("8000000000000000000000000000000000000000000000000000000000000000") diff --git a/tests/test_program_fidelity.py b/tests/test_program_fidelity.py index 384b6da7a..b8753aefe 100644 --- a/tests/test_program_fidelity.py +++ b/tests/test_program_fidelity.py @@ -1,4 +1,4 @@ -from typing import List, Optional +from typing import Optional import string import chia_rs @@ -24,7 +24,7 @@ def rand_int(rnd: Random) -> int: return rnd.randint(0, 100000000000000) -def rand_list(rnd: Random) -> List: +def rand_list(rnd: Random) -> list: size = rnd.randint(0, 3) ret = [] for _ in range(size): diff --git a/tests/test_spend_bundle.py b/tests/test_spend_bundle.py index 5975b12b2..5672ee95c 100644 --- a/tests/test_spend_bundle.py +++ b/tests/test_spend_bundle.py @@ -1,6 +1,6 @@ +from typing import Any from chia_rs import SpendBundle import pytest -from typing import Type expected_add1 = """\ [Coin { parent_coin_info: a48e6325fee4948d0703d1d722416331890e068d095a05049dd516ee7eab7f4b, \ @@ -197,7 +197,7 @@ ], ) def test_spend_bundle( - ty: Type, input_file: str, expected_add: str, expected_rem: str + ty: type[Any], input_file: str, expected_add: str, expected_rem: str ) -> None: buf = open(f"test-bundles/{input_file}.bundle", "rb").read() bundle = ty.from_bytes(buf) diff --git a/tests/test_struct_stream.py b/tests/test_struct_stream.py index 898b34e1e..9b39073fa 100644 --- a/tests/test_struct_stream.py +++ b/tests/test_struct_stream.py @@ -5,7 +5,7 @@ import struct from dataclasses import dataclass from decimal import Decimal -from typing import Iterable, List, Optional, Type +from typing import Iterable, Optional import pytest @@ -37,7 +37,7 @@ def dataclass_parameter(instance: object) -> ParameterSet: ) -def dataclass_parameters(instances: Iterable[object]) -> List[ParameterSet]: +def dataclass_parameters(instances: Iterable[object]) -> list[ParameterSet]: return [dataclass_parameter(instance) for instance in instances] @@ -58,7 +58,7 @@ class BadName: @dataclass(frozen=True) class Good: name: str - cls: Type[StructStream] + cls: type[StructStream] size: int bits: int signed: bool @@ -74,7 +74,7 @@ def create( maximum: int, minimum: int, ) -> Good: - raw_class: Type[StructStream] = type(name, (StructStream,), {}) + raw_class: type[StructStream] = type(name, (StructStream,), {}) parsed_cls = parse_metadata_from_name(raw_class) return cls( name=name, @@ -122,7 +122,7 @@ def good_fixture(request: SubRequest) -> Good: class TestStructStream: def _test_impl( self, - cls: Type[StructStream], + cls: type[StructStream], upper_boundary: int, lower_boundary: int, length: int, diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 21a71f879..443830ed0 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import List, Optional, Tuple, TextIO +from typing import Optional, TextIO from glob import glob output_file = Path(__file__).parent.resolve() / "python" / "chia_rs" / "chia_rs.pyi" @@ -12,8 +12,8 @@ def transform_type(m: str) -> str: n, t = m.split(":") - if "List[" in t: - t = t.replace("List[", "Sequence[") + if "list[" in t: + t = t.replace("list[", "Sequence[") elif "bytes32" == t.strip(): t = " bytes" elif t.strip() in enums: @@ -22,11 +22,22 @@ def transform_type(m: str) -> str: def print_class( - file: TextIO, name: str, members: List[str], extra: Optional[List[str]] = None + file: TextIO, + name: str, + members: list[str], + extra: Optional[list[str]] = None, + martial_for_json_hint: Optional[str] = None, + unmartial_from_json_hint: Optional[str] = None, ): def add_indent(x: str): return "\n " + x + if martial_for_json_hint is None: + martial_for_json_hint = "dict[str, Any]" + + if unmartial_from_json_hint is None: + unmartial_from_json_hint = martial_for_json_hint + init_args = "".join([(",\n " + transform_type(x)) for x in members]) all_replace_parameters = [] @@ -62,14 +73,14 @@ def from_bytes(cls, blob: bytes) -> Self: ... @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> {martial_for_json_hint}: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: {unmartial_from_json_hint}) -> Self: ... """ ) @@ -85,9 +96,9 @@ def rust_type_to_python(t: str) -> str: ret = ( t.replace("<", "[") .replace(">", "]") - .replace("(", "Tuple[") + .replace("(", "tuple[") .replace(")", "]") - .replace("Vec", "List") + .replace("Vec", "list") .replace("Option", "Optional") .replace("Bytes", "bytes") .replace("String", "str") @@ -108,10 +119,10 @@ def rust_type_to_python(t: str) -> str: return ret -def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[str]]]: - ret: List[Tuple[str, List[str]]] = [] +def parse_rust_source(filename: str, upper_case: bool) -> list[tuple[str, list[str]]]: + ret: list[tuple[str, list[str]]] = [] in_struct: Optional[str] = None - members: List[str] = [] + members: list[str] = [] with open(filename) as f: for line in f: if not in_struct: @@ -185,7 +196,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "total_iters: uint128", "height: uint32", "weight: uint128", - "def get_included_reward_coins(self) -> List[Coin]: ...", + "def get_included_reward_coins(self) -> list[Coin]: ...", "def is_fully_compactified(self) -> bool: ...", ], "HeaderBlock": [ @@ -215,19 +226,19 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def get_tree_hash(self) -> bytes32: ...", "@staticmethod\n def default() -> Program: ...", "@staticmethod\n def fromhex(h: str) -> Program: ...", - "def run_mempool_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ...", - "def run_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ...", - "def _run(self, max_cost: int, flags: int, args: object) -> Tuple[int, ChiaProgram]: ...", + "def run_mempool_with_cost(self, max_cost: int, args: object) -> tuple[int, ChiaProgram]: ...", + "def run_with_cost(self, max_cost: int, args: object) -> tuple[int, ChiaProgram]: ...", + "def _run(self, max_cost: int, flags: int, args: object) -> tuple[int, ChiaProgram]: ...", "@staticmethod\n def to(o: object) -> Program: ...", "@staticmethod\n def from_program(p: ChiaProgram) -> Program: ...", "def to_program(self) -> ChiaProgram: ...", - "def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ...", + "def uncurry(self) -> tuple[ChiaProgram, ChiaProgram]: ...", ], "SpendBundle": [ - "@classmethod\n def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...", + "@classmethod\n def aggregate(cls, spend_bundles: list[SpendBundle]) -> Self: ...", "def name(self) -> bytes32: ...", - "def removals(self) -> List[Coin]: ...", - "def additions(self) -> List[Coin]: ...", + "def removals(self) -> list[Coin]: ...", + "def additions(self) -> list[Coin]: ...", ], "BlockRecord": [ "is_transaction_block: bool", @@ -261,7 +272,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s # this file is generated by generate_type_stubs.py # -from typing import List, Mapping, Optional, Sequence, Set, Tuple, Union, Dict, Any, ClassVar, final +from typing import Mapping, Optional, Sequence, Union, Any, ClassVar, final from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 from typing_extensions import Self @@ -272,8 +283,8 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s class _Unspec: pass -def solution_generator(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... -def solution_generator_backrefs(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... +def solution_generator(spends: Sequence[tuple[Coin, bytes, bytes]]) -> bytes: ... +def solution_generator_backrefs(spends: Sequence[tuple[Coin, bytes, bytes]]) -> bytes: ... def compute_merkle_set_root(values: Sequence[bytes]) -> bytes: ... @@ -281,16 +292,16 @@ def supports_fast_forward(spend: CoinSpend) -> bool : ... def fast_forward_singleton(spend: CoinSpend, new_coin: Coin, new_parent: Coin) -> bytes: ... def run_block_generator( - program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants -) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... + program: ReadableBuffer, block_refs: list[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants +) -> tuple[Optional[int], Optional[SpendBundleConditions]]: ... def run_block_generator2( - program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants -) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... + program: ReadableBuffer, block_refs: list[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants +) -> tuple[Optional[int], Optional[SpendBundleConditions]]: ... def additions_and_removals( - program: ReadableBuffer, block_refs: List[ReadableBuffer], flags: int, constants: ConsensusConstants -) -> Tuple[List[Tuple[Coin, Optional[bytes]]], List[Coin]]: ... + program: ReadableBuffer, block_refs: list[ReadableBuffer], flags: int, constants: ConsensusConstants +) -> tuple[list[tuple[Coin, Optional[bytes]]], list[Coin]]: ... def confirm_included_already_hashed( root: bytes32, @@ -309,7 +320,7 @@ def validate_clvm_and_signature( max_cost: int, constants: ConsensusConstants, peak_height: int, -) -> Tuple[SpendBundleConditions, List[Tuple[bytes32, GTElement]], float]: ... +) -> tuple[SpendBundleConditions, list[tuple[bytes32, GTElement]], float]: ... def get_conditions_from_spendbundle( spend_bundle: SpendBundle, @@ -338,25 +349,25 @@ def get_flags_for_height_and_constants( def run_chia_program( program: bytes, args: bytes, max_cost: int, flags: int -) -> Tuple[int, LazyNode]: ... +) -> tuple[int, LazyNode]: ... @final class LazyNode: - pair: Optional[Tuple[LazyNode, LazyNode]] + pair: Optional[tuple[LazyNode, LazyNode]] atom: Optional[bytes] def serialized_length(program: ReadableBuffer) -> int: ... def tree_hash(blob: ReadableBuffer) -> bytes32: ... -def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> Tuple[bytes, bytes]: ... -def get_puzzle_and_solution_for_coin2(generator: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... +def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> tuple[bytes, bytes]: ... +def get_puzzle_and_solution_for_coin2(generator: Program, block_refs: list[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> tuple[Program, Program]: ... @final class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... - def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... - def items(self) -> List[Tuple[bytes, GTElement]]: ... - def update(self, other: Sequence[Tuple[bytes, GTElement]]) -> None: ... + def aggregate_verify(self, pks: list[G1Element], msgs: list[bytes], sig: G2Element) -> bool: ... + def items(self) -> list[tuple[bytes, GTElement]]: ... + def update(self, other: Sequence[tuple[bytes, GTElement]]) -> None: ... @final class AugSchemeMPL: @@ -406,7 +417,7 @@ class MerkleBlob: @property def blob(self) -> bytearray: ... @property - def free_indexes(self) -> Set[uint32]: ... + def free_indexes(self) -> set[uint32]: ... @property def key_to_index(self) -> Mapping[int64, uint32]: ... @@ -419,11 +430,11 @@ def insert(self, key: int64, value: int64, hash: bytes32, reference_kid: Optiona def delete(self, key: int64) -> None: ... def get_raw_node(self, index: uint32) -> Node: ... 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, Node]]:... + def get_nodes_with_indexes(self) -> list[Node]: ... def empty(self) -> bool: ... def get_root_hash(self) -> bytes32: ... - def batch_insert(self, keys_values: List[Tuple[int64, int64]], hashes: List[bytes32]): ... + def batch_insert(self, keys_values: list[tuple[int64, int64]], hashes: list[bytes32]): ... def get_hash_at_index(self, index: uint32): ... def __len__(self) -> int: ... @@ -431,10 +442,10 @@ def __len__(self) -> int: ... @final class MerkleSet: def get_root(self) -> bytes32: ... - def is_included_already_hashed(self, included_leaf: bytes32) -> Tuple[bool, bytes]: ... + def is_included_already_hashed(self, included_leaf: bytes32) -> tuple[bool, bytes]: ... def __init__( self, - leafs: List[bytes32], + leafs: list[bytes32], ) -> None: ... """ ) @@ -456,6 +467,8 @@ def __init__( "def __iadd__(self, other: G1Element) -> G1Element: ...", "def derive_unhardened(self, idx: int) -> G1Element: ...", ], + martial_for_json_hint="str", + unmartial_from_json_hint="Union[str, bytes]", ) print_class( file, @@ -471,6 +484,8 @@ def __init__( "def __add__(self, other: G2Element) -> G2Element: ...", "def __iadd__(self, other: G2Element) -> G2Element: ...", ], + martial_for_json_hint="str", + unmartial_from_json_hint="Union[str, bytes]", ) print_class( file, @@ -482,6 +497,7 @@ def __init__( "def __mul__(self, rhs: GTElement) -> GTElement: ...", "def __imul__(self, rhs: GTElement) -> GTElement : ...", ], + martial_for_json_hint="str", ) print_class( file, @@ -498,6 +514,7 @@ def __init__( "@staticmethod", "def from_seed(seed: bytes) -> PrivateKey: ...", ], + martial_for_json_hint="str", ) print_class( @@ -514,14 +531,14 @@ def __init__( "before_seconds_relative: Optional[int]", "birth_height: Optional[int]", "birth_seconds: Optional[int]", - "create_coin: List[Tuple[bytes, int, Optional[bytes]]]", - "agg_sig_me: List[Tuple[G1Element, bytes]]", - "agg_sig_parent: List[Tuple[G1Element, bytes]]", - "agg_sig_puzzle: List[Tuple[G1Element, bytes]]", - "agg_sig_amount: List[Tuple[G1Element, bytes]]", - "agg_sig_puzzle_amount: List[Tuple[G1Element, bytes]]", - "agg_sig_parent_amount: List[Tuple[G1Element, bytes]]", - "agg_sig_parent_puzzle: List[Tuple[G1Element, bytes]]", + "create_coin: list[tuple[bytes, int, Optional[bytes]]]", + "agg_sig_me: list[tuple[G1Element, bytes]]", + "agg_sig_parent: list[tuple[G1Element, bytes]]", + "agg_sig_puzzle: list[tuple[G1Element, bytes]]", + "agg_sig_amount: list[tuple[G1Element, bytes]]", + "agg_sig_puzzle_amount: list[tuple[G1Element, bytes]]", + "agg_sig_parent_amount: list[tuple[G1Element, bytes]]", + "agg_sig_parent_puzzle: list[tuple[G1Element, bytes]]", "flags: int", ], ) @@ -530,13 +547,13 @@ def __init__( file, "SpendBundleConditions", [ - "spends: List[SpendConditions]", + "spends: list[SpendConditions]", "reserve_fee: int", "height_absolute: int", "seconds_absolute: int", "before_height_absolute: Optional[int]", "before_seconds_absolute: Optional[int]", - "agg_sig_unsafe: List[Tuple[G1Element, bytes]]", + "agg_sig_unsafe: list[tuple[G1Element, bytes]]", "cost: int", "removal_amount: int", "addition_amount: int", @@ -545,4 +562,15 @@ def __init__( ) for item in classes: - print_class(file, item[0], item[1], extra_members.get(item[0])) + # TODO: adjust the system to provide this control via more paths + martial_for_json_hint = None + if item[0] == "Program": + martial_for_json_hint = "str" + + print_class( + file, + item[0], + item[1], + extra_members.get(item[0]), + martial_for_json_hint=martial_for_json_hint, + ) diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 25c2563ba..317552558 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -3,7 +3,7 @@ # this file is generated by generate_type_stubs.py # -from typing import List, Mapping, Optional, Sequence, Set, Tuple, Union, Dict, Any, ClassVar, final +from typing import Mapping, Optional, Sequence, Union, Any, ClassVar, final from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 from typing_extensions import Self @@ -14,8 +14,8 @@ ReadableBuffer = Union[bytes, bytearray, memoryview] class _Unspec: pass -def solution_generator(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... -def solution_generator_backrefs(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... +def solution_generator(spends: Sequence[tuple[Coin, bytes, bytes]]) -> bytes: ... +def solution_generator_backrefs(spends: Sequence[tuple[Coin, bytes, bytes]]) -> bytes: ... def compute_merkle_set_root(values: Sequence[bytes]) -> bytes: ... @@ -23,16 +23,16 @@ def supports_fast_forward(spend: CoinSpend) -> bool : ... def fast_forward_singleton(spend: CoinSpend, new_coin: Coin, new_parent: Coin) -> bytes: ... def run_block_generator( - program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants -) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... + program: ReadableBuffer, block_refs: list[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants +) -> tuple[Optional[int], Optional[SpendBundleConditions]]: ... def run_block_generator2( - program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants -) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... + program: ReadableBuffer, block_refs: list[ReadableBuffer], max_cost: int, flags: int, signature: G2Element, bls_cache: Optional[BLSCache], constants: ConsensusConstants +) -> tuple[Optional[int], Optional[SpendBundleConditions]]: ... def additions_and_removals( - program: ReadableBuffer, block_refs: List[ReadableBuffer], flags: int, constants: ConsensusConstants -) -> Tuple[List[Tuple[Coin, Optional[bytes]]], List[Coin]]: ... + program: ReadableBuffer, block_refs: list[ReadableBuffer], flags: int, constants: ConsensusConstants +) -> tuple[list[tuple[Coin, Optional[bytes]]], list[Coin]]: ... def confirm_included_already_hashed( root: bytes32, @@ -51,7 +51,7 @@ def validate_clvm_and_signature( max_cost: int, constants: ConsensusConstants, peak_height: int, -) -> Tuple[SpendBundleConditions, List[Tuple[bytes32, GTElement]], float]: ... +) -> tuple[SpendBundleConditions, list[tuple[bytes32, GTElement]], float]: ... def get_conditions_from_spendbundle( spend_bundle: SpendBundle, @@ -80,25 +80,25 @@ NO_UNKNOWN_OPS: int = ... def run_chia_program( program: bytes, args: bytes, max_cost: int, flags: int -) -> Tuple[int, LazyNode]: ... +) -> tuple[int, LazyNode]: ... @final class LazyNode: - pair: Optional[Tuple[LazyNode, LazyNode]] + pair: Optional[tuple[LazyNode, LazyNode]] atom: Optional[bytes] def serialized_length(program: ReadableBuffer) -> int: ... def tree_hash(blob: ReadableBuffer) -> bytes32: ... -def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> Tuple[bytes, bytes]: ... -def get_puzzle_and_solution_for_coin2(generator: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... +def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> tuple[bytes, bytes]: ... +def get_puzzle_and_solution_for_coin2(generator: Program, block_refs: list[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> tuple[Program, Program]: ... @final class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... - def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... - def items(self) -> List[Tuple[bytes, GTElement]]: ... - def update(self, other: Sequence[Tuple[bytes, GTElement]]) -> None: ... + def aggregate_verify(self, pks: list[G1Element], msgs: list[bytes], sig: G2Element) -> bool: ... + def items(self) -> list[tuple[bytes, GTElement]]: ... + def update(self, other: Sequence[tuple[bytes, GTElement]]) -> None: ... @final class AugSchemeMPL: @@ -148,7 +148,7 @@ class MerkleBlob: @property def blob(self) -> bytearray: ... @property - def free_indexes(self) -> Set[uint32]: ... + def free_indexes(self) -> set[uint32]: ... @property def key_to_index(self) -> Mapping[int64, uint32]: ... @@ -161,11 +161,11 @@ class MerkleBlob: def delete(self, key: int64) -> None: ... def get_raw_node(self, index: uint32) -> Node: ... 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, Node]]:... + def get_nodes_with_indexes(self) -> list[Node]: ... def empty(self) -> bool: ... def get_root_hash(self) -> bytes32: ... - def batch_insert(self, keys_values: List[Tuple[int64, int64]], hashes: List[bytes32]): ... + def batch_insert(self, keys_values: list[tuple[int64, int64]], hashes: list[bytes32]): ... def get_hash_at_index(self, index: uint32): ... def __len__(self) -> int: ... @@ -173,10 +173,10 @@ class MerkleBlob: @final class MerkleSet: def get_root(self) -> bytes32: ... - def is_included_already_hashed(self, included_leaf: bytes32) -> Tuple[bool, bytes]: ... + def is_included_already_hashed(self, included_leaf: bytes32) -> tuple[bool, bytes]: ... def __init__( self, - leafs: List[bytes32], + leafs: list[bytes32], ) -> None: ... @final @@ -204,14 +204,14 @@ class G1Element: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> str: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: Union[str, bytes]) -> Self: ... @final class G2Element: @@ -235,14 +235,14 @@ class G2Element: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> str: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: Union[str, bytes]) -> Self: ... @final class GTElement: @@ -262,14 +262,14 @@ class GTElement: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> str: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: str) -> Self: ... @final class PrivateKey: @@ -294,14 +294,14 @@ class PrivateKey: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> str: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: str) -> Self: ... @final class SpendConditions: @@ -315,14 +315,14 @@ class SpendConditions: before_seconds_relative: Optional[int] birth_height: Optional[int] birth_seconds: Optional[int] - create_coin: List[Tuple[bytes, int, Optional[bytes]]] - agg_sig_me: List[Tuple[G1Element, bytes]] - agg_sig_parent: List[Tuple[G1Element, bytes]] - agg_sig_puzzle: List[Tuple[G1Element, bytes]] - agg_sig_amount: List[Tuple[G1Element, bytes]] - agg_sig_puzzle_amount: List[Tuple[G1Element, bytes]] - agg_sig_parent_amount: List[Tuple[G1Element, bytes]] - agg_sig_parent_puzzle: List[Tuple[G1Element, bytes]] + create_coin: list[tuple[bytes, int, Optional[bytes]]] + agg_sig_me: list[tuple[G1Element, bytes]] + agg_sig_parent: list[tuple[G1Element, bytes]] + agg_sig_puzzle: list[tuple[G1Element, bytes]] + agg_sig_amount: list[tuple[G1Element, bytes]] + agg_sig_puzzle_amount: list[tuple[G1Element, bytes]] + agg_sig_parent_amount: list[tuple[G1Element, bytes]] + agg_sig_parent_puzzle: list[tuple[G1Element, bytes]] flags: int def __init__( self, @@ -336,14 +336,14 @@ class SpendConditions: before_seconds_relative: Optional[int], birth_height: Optional[int], birth_seconds: Optional[int], - create_coin: Sequence[Tuple[bytes, int, Optional[bytes]]], - agg_sig_me: Sequence[Tuple[G1Element, bytes]], - agg_sig_parent: Sequence[Tuple[G1Element, bytes]], - agg_sig_puzzle: Sequence[Tuple[G1Element, bytes]], - agg_sig_amount: Sequence[Tuple[G1Element, bytes]], - agg_sig_puzzle_amount: Sequence[Tuple[G1Element, bytes]], - agg_sig_parent_amount: Sequence[Tuple[G1Element, bytes]], - agg_sig_parent_puzzle: Sequence[Tuple[G1Element, bytes]], + create_coin: Sequence[tuple[bytes, int, Optional[bytes]]], + agg_sig_me: Sequence[tuple[G1Element, bytes]], + agg_sig_parent: Sequence[tuple[G1Element, bytes]], + agg_sig_puzzle: Sequence[tuple[G1Element, bytes]], + agg_sig_amount: Sequence[tuple[G1Element, bytes]], + agg_sig_puzzle_amount: Sequence[tuple[G1Element, bytes]], + agg_sig_parent_amount: Sequence[tuple[G1Element, bytes]], + agg_sig_parent_puzzle: Sequence[tuple[G1Element, bytes]], flags: int ) -> None: ... def __hash__(self) -> int: ... @@ -355,14 +355,14 @@ class SpendConditions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin_id: Union[ bytes, _Unspec] = _Unspec(), parent_id: Union[ bytes, _Unspec] = _Unspec(), puzzle_hash: Union[ bytes, _Unspec] = _Unspec(), @@ -373,25 +373,25 @@ class SpendConditions: before_seconds_relative: Union[ Optional[int], _Unspec] = _Unspec(), birth_height: Union[ Optional[int], _Unspec] = _Unspec(), birth_seconds: Union[ Optional[int], _Unspec] = _Unspec(), - create_coin: Union[ List[Tuple[bytes, int, Optional[bytes]]], _Unspec] = _Unspec(), - agg_sig_me: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), - agg_sig_parent: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), - agg_sig_puzzle: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), - agg_sig_amount: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), - agg_sig_puzzle_amount: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), - agg_sig_parent_amount: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), - agg_sig_parent_puzzle: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), + create_coin: Union[ list[tuple[bytes, int, Optional[bytes]]], _Unspec] = _Unspec(), + agg_sig_me: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_parent: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_puzzle: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_amount: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_puzzle_amount: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_parent_amount: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_parent_puzzle: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), flags: Union[ int, _Unspec] = _Unspec()) -> SpendConditions: ... @final class SpendBundleConditions: - spends: List[SpendConditions] + spends: list[SpendConditions] reserve_fee: int height_absolute: int seconds_absolute: int before_height_absolute: Optional[int] before_seconds_absolute: Optional[int] - agg_sig_unsafe: List[Tuple[G1Element, bytes]] + agg_sig_unsafe: list[tuple[G1Element, bytes]] cost: int removal_amount: int addition_amount: int @@ -404,7 +404,7 @@ class SpendBundleConditions: seconds_absolute: int, before_height_absolute: Optional[int], before_seconds_absolute: Optional[int], - agg_sig_unsafe: Sequence[Tuple[G1Element, bytes]], + agg_sig_unsafe: Sequence[tuple[G1Element, bytes]], cost: int, removal_amount: int, addition_amount: int, @@ -419,21 +419,21 @@ class SpendBundleConditions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, spends: Union[ List[SpendConditions], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, spends: Union[ list[SpendConditions], _Unspec] = _Unspec(), reserve_fee: Union[ int, _Unspec] = _Unspec(), height_absolute: Union[ int, _Unspec] = _Unspec(), seconds_absolute: Union[ int, _Unspec] = _Unspec(), before_height_absolute: Union[ Optional[int], _Unspec] = _Unspec(), before_seconds_absolute: Union[ Optional[int], _Unspec] = _Unspec(), - agg_sig_unsafe: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), + agg_sig_unsafe: Union[ list[tuple[G1Element, bytes]], _Unspec] = _Unspec(), cost: Union[ int, _Unspec] = _Unspec(), removal_amount: Union[ int, _Unspec] = _Unspec(), addition_amount: Union[ int, _Unspec] = _Unspec(), @@ -461,10 +461,10 @@ class BlockRecord: timestamp: Optional[uint64] prev_transaction_block_hash: Optional[bytes32] fees: Optional[uint64] - reward_claims_incorporated: Optional[List[Coin]] - finished_challenge_slot_hashes: Optional[List[bytes32]] - finished_infused_challenge_slot_hashes: Optional[List[bytes32]] - finished_reward_slot_hashes: Optional[List[bytes32]] + reward_claims_incorporated: Optional[list[Coin]] + finished_challenge_slot_hashes: Optional[list[bytes32]] + finished_infused_challenge_slot_hashes: Optional[list[bytes32]] + finished_reward_slot_hashes: Optional[list[bytes32]] sub_epoch_summary_included: Optional[SubEpochSummary] is_transaction_block: bool first_in_sub_slot: bool @@ -511,14 +511,14 @@ class BlockRecord: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), prev_hash: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), @@ -539,10 +539,10 @@ class BlockRecord: timestamp: Union[ Optional[uint64], _Unspec] = _Unspec(), prev_transaction_block_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), fees: Union[ Optional[uint64], _Unspec] = _Unspec(), - reward_claims_incorporated: Union[ Optional[List[Coin]], _Unspec] = _Unspec(), - finished_challenge_slot_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec(), - finished_infused_challenge_slot_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec(), - finished_reward_slot_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec(), + reward_claims_incorporated: Union[ Optional[list[Coin]], _Unspec] = _Unspec(), + finished_challenge_slot_hashes: Union[ Optional[list[bytes32]], _Unspec] = _Unspec(), + finished_infused_challenge_slot_hashes: Union[ Optional[list[bytes32]], _Unspec] = _Unspec(), + finished_reward_slot_hashes: Union[ Optional[list[bytes32]], _Unspec] = _Unspec(), sub_epoch_summary_included: Union[ Optional[SubEpochSummary], _Unspec] = _Unspec()) -> BlockRecord: ... @final @@ -565,14 +565,14 @@ class Message: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, msg_type: Union[ int, _Unspec] = _Unspec(), id: Union[ Optional[uint16], _Unspec] = _Unspec(), data: Union[ bytes, _Unspec] = _Unspec()) -> Message: ... @@ -584,7 +584,7 @@ class Handshake: software_version: str server_port: uint16 node_type: int - capabilities: List[Tuple[uint16, str]] + capabilities: list[tuple[uint16, str]] def __init__( self, network_id: str, @@ -592,7 +592,7 @@ class Handshake: software_version: str, server_port: uint16, node_type: int, - capabilities: Sequence[Tuple[uint16, str]] + capabilities: Sequence[tuple[uint16, str]] ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... @@ -603,20 +603,20 @@ class Handshake: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, network_id: Union[ str, _Unspec] = _Unspec(), protocol_version: Union[ str, _Unspec] = _Unspec(), software_version: Union[ str, _Unspec] = _Unspec(), server_port: Union[ uint16, _Unspec] = _Unspec(), node_type: Union[ int, _Unspec] = _Unspec(), - capabilities: Union[ List[Tuple[uint16, str]], _Unspec] = _Unspec()) -> Handshake: ... + capabilities: Union[ list[tuple[uint16, str]], _Unspec] = _Unspec()) -> Handshake: ... @final class ClassgroupElement: @@ -640,14 +640,14 @@ class ClassgroupElement: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, data: Union[ bytes100, _Unspec] = _Unspec()) -> ClassgroupElement: ... @final @@ -671,14 +671,14 @@ class Coin: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, parent_coin_info: Union[ bytes32, _Unspec] = _Unspec(), puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), amount: Union[ uint64, _Unspec] = _Unspec()) -> Coin: ... @@ -703,14 +703,14 @@ class CoinSpend: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin: Union[ Coin, _Unspec] = _Unspec(), puzzle_reveal: Union[ Program, _Unspec] = _Unspec(), solution: Union[ Program, _Unspec] = _Unspec()) -> CoinSpend: ... @@ -735,14 +735,14 @@ class CoinState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin: Union[ Coin, _Unspec] = _Unspec(), spent_height: Union[ Optional[uint32], _Unspec] = _Unspec(), created_height: Union[ Optional[uint32], _Unspec] = _Unspec()) -> CoinState: ... @@ -769,14 +769,14 @@ class EndOfSubSlotBundle: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, challenge_chain: Union[ ChallengeChainSubSlot, _Unspec] = _Unspec(), infused_challenge_chain: Union[ Optional[InfusedChallengeChainSubSlot], _Unspec] = _Unspec(), reward_chain: Union[ RewardChainSubSlot, _Unspec] = _Unspec(), @@ -798,14 +798,14 @@ class FeeRate: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, mojos_per_clvm_cost: Union[ uint64, _Unspec] = _Unspec()) -> FeeRate: ... @final @@ -828,14 +828,14 @@ class FeeEstimate: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), time_target: Union[ uint64, _Unspec] = _Unspec(), estimated_fee_rate: Union[ FeeRate, _Unspec] = _Unspec()) -> FeeEstimate: ... @@ -843,7 +843,7 @@ class FeeEstimate: @final class FeeEstimateGroup: error: Optional[str] - estimates: List[FeeEstimate] + estimates: list[FeeEstimate] def __init__( self, error: Optional[str], @@ -858,16 +858,16 @@ class FeeEstimateGroup: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), - estimates: Union[ List[FeeEstimate], _Unspec] = _Unspec()) -> FeeEstimateGroup: ... + estimates: Union[ list[FeeEstimate], _Unspec] = _Unspec()) -> FeeEstimateGroup: ... @final class TransactionsInfo: @@ -876,7 +876,7 @@ class TransactionsInfo: aggregated_signature: G2Element fees: uint64 cost: uint64 - reward_claims_incorporated: List[Coin] + reward_claims_incorporated: list[Coin] def __init__( self, generator_root: bytes, @@ -895,20 +895,20 @@ class TransactionsInfo: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, generator_root: Union[ bytes32, _Unspec] = _Unspec(), generator_refs_root: Union[ bytes32, _Unspec] = _Unspec(), aggregated_signature: Union[ G2Element, _Unspec] = _Unspec(), fees: Union[ uint64, _Unspec] = _Unspec(), cost: Union[ uint64, _Unspec] = _Unspec(), - reward_claims_incorporated: Union[ List[Coin], _Unspec] = _Unspec()) -> TransactionsInfo: ... + reward_claims_incorporated: Union[ list[Coin], _Unspec] = _Unspec()) -> TransactionsInfo: ... @final class FoliageTransactionBlock: @@ -936,14 +936,14 @@ class FoliageTransactionBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, prev_transaction_block_hash: Union[ bytes32, _Unspec] = _Unspec(), timestamp: Union[ uint64, _Unspec] = _Unspec(), filter_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -975,14 +975,14 @@ class FoliageBlockData: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, unfinished_reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), pool_target: Union[ PoolTarget, _Unspec] = _Unspec(), pool_signature: Union[ Optional[G2Element], _Unspec] = _Unspec(), @@ -1015,14 +1015,14 @@ class Foliage: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, prev_block_hash: Union[ bytes32, _Unspec] = _Unspec(), reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), foliage_block_data: Union[ FoliageBlockData, _Unspec] = _Unspec(), @@ -1054,14 +1054,14 @@ class NewPeak: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), weight: Union[ uint128, _Unspec] = _Unspec(), @@ -1088,14 +1088,14 @@ class NewTransaction: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec(), cost: Union[ uint64, _Unspec] = _Unspec(), fees: Union[ uint64, _Unspec] = _Unspec()) -> NewTransaction: ... @@ -1116,14 +1116,14 @@ class RequestTransaction: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec()) -> RequestTransaction: ... @final @@ -1142,14 +1142,14 @@ class RespondTransaction: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> RespondTransaction: ... @final @@ -1170,14 +1170,14 @@ class RequestProofOfWeight: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, total_number_of_blocks: Union[ uint32, _Unspec] = _Unspec(), tip: Union[ bytes32, _Unspec] = _Unspec()) -> RequestProofOfWeight: ... @@ -1199,14 +1199,14 @@ class RespondProofOfWeight: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, wp: Union[ WeightProof, _Unspec] = _Unspec(), tip: Union[ bytes32, _Unspec] = _Unspec()) -> RespondProofOfWeight: ... @@ -1228,14 +1228,14 @@ class RequestBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlock: ... @@ -1255,14 +1255,14 @@ class RejectBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlock: ... @final @@ -1285,14 +1285,14 @@ class RequestBlocks: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlocks: ... @@ -1301,7 +1301,7 @@ class RequestBlocks: class RespondBlocks: start_height: uint32 end_height: uint32 - blocks: List[FullBlock] + blocks: list[FullBlock] def __init__( self, start_height: uint32, @@ -1317,17 +1317,17 @@ class RespondBlocks: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), - blocks: Union[ List[FullBlock], _Unspec] = _Unspec()) -> RespondBlocks: ... + blocks: Union[ list[FullBlock], _Unspec] = _Unspec()) -> RespondBlocks: ... @final class RejectBlocks: @@ -1347,14 +1347,14 @@ class RejectBlocks: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlocks: ... @@ -1374,14 +1374,14 @@ class RespondBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, block: Union[ FullBlock, _Unspec] = _Unspec()) -> RespondBlock: ... @final @@ -1400,14 +1400,14 @@ class NewUnfinishedBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> NewUnfinishedBlock: ... @final @@ -1426,14 +1426,14 @@ class RequestUnfinishedBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RequestUnfinishedBlock: ... @final @@ -1452,14 +1452,14 @@ class RespondUnfinishedBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, unfinished_block: Union[ UnfinishedBlock, _Unspec] = _Unspec()) -> RespondUnfinishedBlock: ... @final @@ -1484,14 +1484,14 @@ class NewSignagePointOrEndOfSubSlot: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, prev_challenge_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), @@ -1517,14 +1517,14 @@ class RequestSignagePointOrEndOfSubSlot: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), last_rc_infusion: Union[ bytes32, _Unspec] = _Unspec()) -> RequestSignagePointOrEndOfSubSlot: ... @@ -1553,14 +1553,14 @@ class RespondSignagePoint: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), challenge_chain_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), challenge_chain_proof: Union[ VDFProof, _Unspec] = _Unspec(), @@ -1583,14 +1583,14 @@ class RespondEndOfSubSlot: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, end_of_slot_bundle: Union[ EndOfSubSlotBundle, _Unspec] = _Unspec()) -> RespondEndOfSubSlot: ... @final @@ -1609,14 +1609,14 @@ class RequestMempoolTransactions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, filter: Union[ bytes, _Unspec] = _Unspec()) -> RequestMempoolTransactions: ... @final @@ -1641,14 +1641,14 @@ class NewCompactVDF: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), field_vdf: Union[ uint8, _Unspec] = _Unspec(), @@ -1676,14 +1676,14 @@ class RequestCompactVDF: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), field_vdf: Union[ uint8, _Unspec] = _Unspec(), @@ -1713,14 +1713,14 @@ class RespondCompactVDF: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), field_vdf: Union[ uint8, _Unspec] = _Unspec(), @@ -1741,18 +1741,18 @@ class RequestPeers: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... @final class RespondPeers: - peer_list: List[TimestampedPeerInfo] + peer_list: list[TimestampedPeerInfo] def __init__( self, peer_list: Sequence[TimestampedPeerInfo] @@ -1766,15 +1766,15 @@ class RespondPeers: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, peer_list: Union[ List[TimestampedPeerInfo], _Unspec] = _Unspec()) -> RespondPeers: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, peer_list: Union[ list[TimestampedPeerInfo], _Unspec] = _Unspec()) -> RespondPeers: ... @final class NewUnfinishedBlock2: @@ -1794,14 +1794,14 @@ class NewUnfinishedBlock2: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> NewUnfinishedBlock2: ... @@ -1823,20 +1823,20 @@ class RequestUnfinishedBlock2: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> RequestUnfinishedBlock2: ... @final class FullBlock: - finished_sub_slots: List[EndOfSubSlotBundle] + finished_sub_slots: list[EndOfSubSlotBundle] reward_chain_block: RewardChainBlock challenge_chain_sp_proof: Optional[VDFProof] challenge_chain_ip_proof: VDFProof @@ -1847,14 +1847,14 @@ class FullBlock: foliage_transaction_block: Optional[FoliageTransactionBlock] transactions_info: Optional[TransactionsInfo] transactions_generator: Optional[Program] - transactions_generator_ref_list: List[uint32] + transactions_generator_ref_list: list[uint32] prev_header_hash: bytes32 header_hash: bytes32 def is_transaction_block(self) -> bool: ... total_iters: uint128 height: uint32 weight: uint128 - def get_included_reward_coins(self) -> List[Coin]: ... + def get_included_reward_coins(self) -> list[Coin]: ... def is_fully_compactified(self) -> bool: ... def __init__( self, @@ -1880,15 +1880,15 @@ class FullBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, finished_sub_slots: Union[ list[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), challenge_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), @@ -1899,11 +1899,11 @@ class FullBlock: foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec(), transactions_generator: Union[ Optional[Program], _Unspec] = _Unspec(), - transactions_generator_ref_list: Union[ List[uint32], _Unspec] = _Unspec()) -> FullBlock: ... + transactions_generator_ref_list: Union[ list[uint32], _Unspec] = _Unspec()) -> FullBlock: ... @final class HeaderBlock: - finished_sub_slots: List[EndOfSubSlotBundle] + finished_sub_slots: list[EndOfSubSlotBundle] reward_chain_block: RewardChainBlock challenge_chain_sp_proof: Optional[VDFProof] challenge_chain_ip_proof: VDFProof @@ -1946,15 +1946,15 @@ class HeaderBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, finished_sub_slots: Union[ list[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), challenge_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), @@ -1986,14 +1986,14 @@ class TimestampedPeerInfo: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, host: Union[ str, _Unspec] = _Unspec(), port: Union[ uint16, _Unspec] = _Unspec(), timestamp: Union[ uint64, _Unspec] = _Unspec()) -> TimestampedPeerInfo: ... @@ -2016,14 +2016,14 @@ class PoolTarget: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), max_height: Union[ uint32, _Unspec] = _Unspec()) -> PoolTarget: ... @@ -2035,15 +2035,15 @@ class Program: def default() -> Program: ... @staticmethod def fromhex(h: str) -> Program: ... - def run_mempool_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... - def run_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... - def _run(self, max_cost: int, flags: int, args: object) -> Tuple[int, ChiaProgram]: ... + def run_mempool_with_cost(self, max_cost: int, args: object) -> tuple[int, ChiaProgram]: ... + def run_with_cost(self, max_cost: int, args: object) -> tuple[int, ChiaProgram]: ... + def _run(self, max_cost: int, flags: int, args: object) -> tuple[int, ChiaProgram]: ... @staticmethod def to(o: object) -> Program: ... @staticmethod def from_program(p: ChiaProgram) -> Program: ... def to_program(self) -> ChiaProgram: ... - def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ... + def uncurry(self) -> tuple[ChiaProgram, ChiaProgram]: ... def __init__( self, a0: bytes @@ -2057,14 +2057,14 @@ class Program: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> str: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: str) -> Self: ... @final class ProofOfSpace: @@ -2092,14 +2092,14 @@ class ProofOfSpace: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), pool_public_key: Union[ Optional[G1Element], _Unspec] = _Unspec(), pool_contract_puzzle_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), @@ -2137,14 +2137,14 @@ class RewardChainBlockUnfinished: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, total_iters: Union[ uint128, _Unspec] = _Unspec(), signage_point_index: Union[ uint8, _Unspec] = _Unspec(), pos_ss_cc_challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -2197,14 +2197,14 @@ class RewardChainBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, weight: Union[ uint128, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), total_iters: Union[ uint128, _Unspec] = _Unspec(), @@ -2242,14 +2242,14 @@ class ChallengeBlockInfo: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), @@ -2279,14 +2279,14 @@ class ChallengeChainSubSlot: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), subepoch_summary_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), @@ -2309,14 +2309,14 @@ class InfusedChallengeChainSubSlot: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, infused_challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec()) -> InfusedChallengeChainSubSlot: ... @final @@ -2341,14 +2341,14 @@ class RewardChainSubSlot: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), challenge_chain_sub_slot_hash: Union[ bytes32, _Unspec] = _Unspec(), infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), @@ -2374,27 +2374,27 @@ class SubSlotProofs: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, challenge_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec(), infused_challenge_chain_slot_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), reward_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> SubSlotProofs: ... class SpendBundle: - coin_spends: List[CoinSpend] + coin_spends: list[CoinSpend] aggregated_signature: G2Element @classmethod - def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ... + def aggregate(cls, spend_bundles: list[SpendBundle]) -> Self: ... def name(self) -> bytes32: ... - def removals(self) -> List[Coin]: ... - def additions(self) -> List[Coin]: ... + def removals(self) -> list[Coin]: ... + def additions(self) -> list[Coin]: ... def __init__( self, coin_spends: Sequence[CoinSpend], @@ -2409,15 +2409,15 @@ class SpendBundle: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_spends: Union[ List[CoinSpend], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_spends: Union[ list[CoinSpend], _Unspec] = _Unspec(), aggregated_signature: Union[ G2Element, _Unspec] = _Unspec()) -> SpendBundle: ... @final @@ -2444,14 +2444,14 @@ class SubEpochSummary: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, prev_subepoch_summary_hash: Union[ bytes32, _Unspec] = _Unspec(), reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), @@ -2460,7 +2460,7 @@ class SubEpochSummary: @final class UnfinishedBlock: - finished_sub_slots: List[EndOfSubSlotBundle] + finished_sub_slots: list[EndOfSubSlotBundle] reward_chain_block: RewardChainBlockUnfinished challenge_chain_sp_proof: Optional[VDFProof] reward_chain_sp_proof: Optional[VDFProof] @@ -2468,7 +2468,7 @@ class UnfinishedBlock: foliage_transaction_block: Optional[FoliageTransactionBlock] transactions_info: Optional[TransactionsInfo] transactions_generator: Optional[Program] - transactions_generator_ref_list: List[uint32] + transactions_generator_ref_list: list[uint32] prev_header_hash: bytes32 partial_hash: bytes32 def is_transaction_block(self) -> bool: ... @@ -2494,15 +2494,15 @@ class UnfinishedBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, finished_sub_slots: Union[ list[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -2510,11 +2510,11 @@ class UnfinishedBlock: foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec(), transactions_generator: Union[ Optional[Program], _Unspec] = _Unspec(), - transactions_generator_ref_list: Union[ List[uint32], _Unspec] = _Unspec()) -> UnfinishedBlock: ... + transactions_generator_ref_list: Union[ list[uint32], _Unspec] = _Unspec()) -> UnfinishedBlock: ... @final class UnfinishedHeaderBlock: - finished_sub_slots: List[EndOfSubSlotBundle] + finished_sub_slots: list[EndOfSubSlotBundle] reward_chain_block: RewardChainBlockUnfinished challenge_chain_sp_proof: Optional[VDFProof] reward_chain_sp_proof: Optional[VDFProof] @@ -2543,15 +2543,15 @@ class UnfinishedHeaderBlock: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, finished_sub_slots: Union[ list[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -2579,14 +2579,14 @@ class VDFInfo: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), number_of_iterations: Union[ uint64, _Unspec] = _Unspec(), output: Union[ ClassgroupElement, _Unspec] = _Unspec()) -> VDFInfo: ... @@ -2611,14 +2611,14 @@ class VDFProof: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, witness_type: Union[ uint8, _Unspec] = _Unspec(), witness: Union[ bytes, _Unspec] = _Unspec(), normalized_to_identity: Union[ bool, _Unspec] = _Unspec()) -> VDFProof: ... @@ -2641,14 +2641,14 @@ class RequestPuzzleSolution: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec()) -> RequestPuzzleSolution: ... @@ -2674,14 +2674,14 @@ class PuzzleSolutionResponse: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), puzzle: Union[ Program, _Unspec] = _Unspec(), @@ -2703,14 +2703,14 @@ class RespondPuzzleSolution: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, response: Union[ PuzzleSolutionResponse, _Unspec] = _Unspec()) -> RespondPuzzleSolution: ... @final @@ -2731,14 +2731,14 @@ class RejectPuzzleSolution: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec()) -> RejectPuzzleSolution: ... @@ -2758,14 +2758,14 @@ class SendTransaction: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> SendTransaction: ... @final @@ -2788,14 +2788,14 @@ class TransactionAck: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, txid: Union[ bytes32, _Unspec] = _Unspec(), status: Union[ uint8, _Unspec] = _Unspec(), error: Union[ Optional[str], _Unspec] = _Unspec()) -> TransactionAck: ... @@ -2822,14 +2822,14 @@ class NewPeakWallet: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), weight: Union[ uint128, _Unspec] = _Unspec(), @@ -2851,14 +2851,14 @@ class RequestBlockHeader: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RequestBlockHeader: ... @final @@ -2877,14 +2877,14 @@ class RespondBlockHeader: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, header_block: Union[ HeaderBlock, _Unspec] = _Unspec()) -> RespondBlockHeader: ... @final @@ -2903,21 +2903,21 @@ class RejectHeaderRequest: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderRequest: ... @final class RequestRemovals: height: uint32 header_hash: bytes32 - coin_names: Optional[List[bytes32]] + coin_names: Optional[list[bytes32]] def __init__( self, height: uint32, @@ -2933,30 +2933,30 @@ class RequestRemovals: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), - coin_names: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovals: ... + coin_names: Union[ Optional[list[bytes32]], _Unspec] = _Unspec()) -> RequestRemovals: ... @final class RespondRemovals: height: uint32 header_hash: bytes32 - coins: List[Tuple[bytes32, Optional[Coin]]] - proofs: Optional[List[Tuple[bytes32, bytes]]] + coins: list[tuple[bytes32, Optional[Coin]]] + proofs: Optional[list[tuple[bytes32, bytes]]] def __init__( self, height: uint32, header_hash: bytes, - coins: Sequence[Tuple[bytes32, Optional[Coin]]], - proofs: Optional[Sequence[Tuple[bytes32, bytes]]] + coins: Sequence[tuple[bytes32, Optional[Coin]]], + proofs: Optional[Sequence[tuple[bytes32, bytes]]] ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... @@ -2967,18 +2967,18 @@ class RespondRemovals: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), - coins: Union[ List[Tuple[bytes32, Optional[Coin]]], _Unspec] = _Unspec(), - proofs: Union[ Optional[List[Tuple[bytes32, bytes]]], _Unspec] = _Unspec()) -> RespondRemovals: ... + coins: Union[ list[tuple[bytes32, Optional[Coin]]], _Unspec] = _Unspec(), + proofs: Union[ Optional[list[tuple[bytes32, bytes]]], _Unspec] = _Unspec()) -> RespondRemovals: ... @final class RejectRemovalsRequest: @@ -2998,14 +2998,14 @@ class RejectRemovalsRequest: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectRemovalsRequest: ... @@ -3013,7 +3013,7 @@ class RejectRemovalsRequest: class RequestAdditions: height: uint32 header_hash: Optional[bytes32] - puzzle_hashes: Optional[List[bytes32]] + puzzle_hashes: Optional[list[bytes32]] def __init__( self, height: uint32, @@ -3029,30 +3029,30 @@ class RequestAdditions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestAdditions: ... + puzzle_hashes: Union[ Optional[list[bytes32]], _Unspec] = _Unspec()) -> RequestAdditions: ... @final class RespondAdditions: height: uint32 header_hash: bytes32 - coins: List[Tuple[bytes32, List[Coin]]] - proofs: Optional[List[Tuple[bytes32, bytes, Optional[bytes]]]] + coins: list[tuple[bytes32, list[Coin]]] + proofs: Optional[list[tuple[bytes32, bytes, Optional[bytes]]]] def __init__( self, height: uint32, header_hash: bytes, - coins: Sequence[Tuple[bytes32, Sequence[Coin]]], - proofs: Optional[Sequence[Tuple[bytes32, bytes, Optional[bytes]]]] + coins: Sequence[tuple[bytes32, Sequence[Coin]]], + proofs: Optional[Sequence[tuple[bytes32, bytes, Optional[bytes]]]] ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... @@ -3063,18 +3063,18 @@ class RespondAdditions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), - coins: Union[ List[Tuple[bytes32, List[Coin]]], _Unspec] = _Unspec(), - proofs: Union[ Optional[List[Tuple[bytes32, bytes, Optional[bytes]]]], _Unspec] = _Unspec()) -> RespondAdditions: ... + coins: Union[ list[tuple[bytes32, list[Coin]]], _Unspec] = _Unspec(), + proofs: Union[ Optional[list[tuple[bytes32, bytes, Optional[bytes]]]], _Unspec] = _Unspec()) -> RespondAdditions: ... @final class RejectAdditionsRequest: @@ -3094,14 +3094,14 @@ class RejectAdditionsRequest: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectAdditionsRequest: ... @@ -3109,7 +3109,7 @@ class RejectAdditionsRequest: class RespondBlockHeaders: start_height: uint32 end_height: uint32 - header_blocks: List[HeaderBlock] + header_blocks: list[HeaderBlock] def __init__( self, start_height: uint32, @@ -3125,17 +3125,17 @@ class RespondBlockHeaders: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), - header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondBlockHeaders: ... + header_blocks: Union[ list[HeaderBlock], _Unspec] = _Unspec()) -> RespondBlockHeaders: ... @final class RejectBlockHeaders: @@ -3155,14 +3155,14 @@ class RejectBlockHeaders: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlockHeaders: ... @@ -3186,14 +3186,14 @@ class RequestBlockHeaders: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), return_filter: Union[ bool, _Unspec] = _Unspec()) -> RequestBlockHeaders: ... @@ -3216,14 +3216,14 @@ class RequestHeaderBlocks: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestHeaderBlocks: ... @@ -3245,14 +3245,14 @@ class RejectHeaderBlocks: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderBlocks: ... @@ -3260,7 +3260,7 @@ class RejectHeaderBlocks: class RespondHeaderBlocks: start_height: uint32 end_height: uint32 - header_blocks: List[HeaderBlock] + header_blocks: list[HeaderBlock] def __init__( self, start_height: uint32, @@ -3276,21 +3276,21 @@ class RespondHeaderBlocks: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), - header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondHeaderBlocks: ... + header_blocks: Union[ list[HeaderBlock], _Unspec] = _Unspec()) -> RespondHeaderBlocks: ... @final class RegisterForPhUpdates: - puzzle_hashes: List[bytes32] + puzzle_hashes: list[bytes32] min_height: uint32 def __init__( self, @@ -3306,22 +3306,22 @@ class RegisterForPhUpdates: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, puzzle_hashes: Union[ list[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForPhUpdates: ... @final class RespondToPhUpdates: - puzzle_hashes: List[bytes32] + puzzle_hashes: list[bytes32] min_height: uint32 - coin_states: List[CoinState] + coin_states: list[CoinState] def __init__( self, puzzle_hashes: Sequence[bytes32], @@ -3337,21 +3337,21 @@ class RespondToPhUpdates: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, puzzle_hashes: Union[ list[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToPhUpdates: ... + coin_states: Union[ list[CoinState], _Unspec] = _Unspec()) -> RespondToPhUpdates: ... @final class RegisterForCoinUpdates: - coin_ids: List[bytes32] + coin_ids: list[bytes32] min_height: uint32 def __init__( self, @@ -3367,22 +3367,22 @@ class RegisterForCoinUpdates: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_ids: Union[ list[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForCoinUpdates: ... @final class RespondToCoinUpdates: - coin_ids: List[bytes32] + coin_ids: list[bytes32] min_height: uint32 - coin_states: List[CoinState] + coin_states: list[CoinState] def __init__( self, coin_ids: Sequence[bytes32], @@ -3398,24 +3398,24 @@ class RespondToCoinUpdates: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_ids: Union[ list[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToCoinUpdates: ... + coin_states: Union[ list[CoinState], _Unspec] = _Unspec()) -> RespondToCoinUpdates: ... @final class CoinStateUpdate: height: uint32 fork_height: uint32 peak_hash: bytes32 - items: List[CoinState] + items: list[CoinState] def __init__( self, height: uint32, @@ -3432,18 +3432,18 @@ class CoinStateUpdate: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), fork_height: Union[ uint32, _Unspec] = _Unspec(), peak_hash: Union[ bytes32, _Unspec] = _Unspec(), - items: Union[ List[CoinState], _Unspec] = _Unspec()) -> CoinStateUpdate: ... + items: Union[ list[CoinState], _Unspec] = _Unspec()) -> CoinStateUpdate: ... @final class RequestChildren: @@ -3461,19 +3461,19 @@ class RequestChildren: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec()) -> RequestChildren: ... @final class RespondChildren: - coin_states: List[CoinState] + coin_states: list[CoinState] def __init__( self, coin_states: Sequence[CoinState] @@ -3487,15 +3487,15 @@ class RespondChildren: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondChildren: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_states: Union[ list[CoinState], _Unspec] = _Unspec()) -> RespondChildren: ... @final class RequestSesInfo: @@ -3515,21 +3515,21 @@ class RequestSesInfo: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestSesInfo: ... @final class RespondSesInfo: - reward_chain_hash: List[bytes32] - heights: List[List[uint32]] + reward_chain_hash: list[bytes32] + heights: list[list[uint32]] def __init__( self, reward_chain_hash: Sequence[bytes32], @@ -3544,20 +3544,20 @@ class RespondSesInfo: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, reward_chain_hash: Union[ List[bytes32], _Unspec] = _Unspec(), - heights: Union[ List[List[uint32]], _Unspec] = _Unspec()) -> RespondSesInfo: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, reward_chain_hash: Union[ list[bytes32], _Unspec] = _Unspec(), + heights: Union[ list[list[uint32]], _Unspec] = _Unspec()) -> RespondSesInfo: ... @final class RequestFeeEstimates: - time_targets: List[uint64] + time_targets: list[uint64] def __init__( self, time_targets: Sequence[uint64] @@ -3571,15 +3571,15 @@ class RequestFeeEstimates: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, time_targets: Union[ List[uint64], _Unspec] = _Unspec()) -> RequestFeeEstimates: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, time_targets: Union[ list[uint64], _Unspec] = _Unspec()) -> RequestFeeEstimates: ... @final class RespondFeeEstimates: @@ -3597,19 +3597,19 @@ class RespondFeeEstimates: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, estimates: Union[ FeeEstimateGroup, _Unspec] = _Unspec()) -> RespondFeeEstimates: ... @final class RequestRemovePuzzleSubscriptions: - puzzle_hashes: Optional[List[bytes32]] + puzzle_hashes: Optional[list[bytes32]] def __init__( self, puzzle_hashes: Optional[Sequence[bytes32]] @@ -3623,19 +3623,19 @@ class RequestRemovePuzzleSubscriptions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovePuzzleSubscriptions: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, puzzle_hashes: Union[ Optional[list[bytes32]], _Unspec] = _Unspec()) -> RequestRemovePuzzleSubscriptions: ... @final class RespondRemovePuzzleSubscriptions: - puzzle_hashes: List[bytes32] + puzzle_hashes: list[bytes32] def __init__( self, puzzle_hashes: Sequence[bytes32] @@ -3649,19 +3649,19 @@ class RespondRemovePuzzleSubscriptions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemovePuzzleSubscriptions: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, puzzle_hashes: Union[ list[bytes32], _Unspec] = _Unspec()) -> RespondRemovePuzzleSubscriptions: ... @final class RequestRemoveCoinSubscriptions: - coin_ids: Optional[List[bytes32]] + coin_ids: Optional[list[bytes32]] def __init__( self, coin_ids: Optional[Sequence[bytes32]] @@ -3675,19 +3675,19 @@ class RequestRemoveCoinSubscriptions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_ids: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemoveCoinSubscriptions: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_ids: Union[ Optional[list[bytes32]], _Unspec] = _Unspec()) -> RequestRemoveCoinSubscriptions: ... @final class RespondRemoveCoinSubscriptions: - coin_ids: List[bytes32] + coin_ids: list[bytes32] def __init__( self, coin_ids: Sequence[bytes32] @@ -3701,15 +3701,15 @@ class RespondRemoveCoinSubscriptions: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemoveCoinSubscriptions: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_ids: Union[ list[bytes32], _Unspec] = _Unspec()) -> RespondRemoveCoinSubscriptions: ... @final class CoinStateFilters: @@ -3733,14 +3733,14 @@ class CoinStateFilters: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, include_spent: Union[ bool, _Unspec] = _Unspec(), include_unspent: Union[ bool, _Unspec] = _Unspec(), include_hinted: Union[ bool, _Unspec] = _Unspec(), @@ -3748,7 +3748,7 @@ class CoinStateFilters: @final class RequestPuzzleState: - puzzle_hashes: List[bytes32] + puzzle_hashes: list[bytes32] previous_height: Optional[uint32] header_hash: bytes32 filters: CoinStateFilters @@ -3770,15 +3770,15 @@ class RequestPuzzleState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, puzzle_hashes: Union[ list[bytes32], _Unspec] = _Unspec(), previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), filters: Union[ CoinStateFilters, _Unspec] = _Unspec(), @@ -3786,11 +3786,11 @@ class RequestPuzzleState: @final class RespondPuzzleState: - puzzle_hashes: List[bytes32] + puzzle_hashes: list[bytes32] height: uint32 header_hash: bytes32 is_finished: bool - coin_states: List[CoinState] + coin_states: list[CoinState] def __init__( self, puzzle_hashes: Sequence[bytes32], @@ -3808,19 +3808,19 @@ class RespondPuzzleState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, puzzle_hashes: Union[ list[bytes32], _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), is_finished: Union[ bool, _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondPuzzleState: ... + coin_states: Union[ list[CoinState], _Unspec] = _Unspec()) -> RespondPuzzleState: ... @final class RejectPuzzleState: @@ -3838,19 +3838,19 @@ class RejectPuzzleState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectPuzzleState: ... @final class RequestCoinState: - coin_ids: List[bytes32] + coin_ids: list[bytes32] previous_height: Optional[uint32] header_hash: bytes32 subscribe: bool @@ -3870,23 +3870,23 @@ class RequestCoinState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_ids: Union[ list[bytes32], _Unspec] = _Unspec(), previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), subscribe: Union[ bool, _Unspec] = _Unspec()) -> RequestCoinState: ... @final class RespondCoinState: - coin_ids: List[bytes32] - coin_states: List[CoinState] + coin_ids: list[bytes32] + coin_states: list[CoinState] def __init__( self, coin_ids: Sequence[bytes32], @@ -3901,16 +3901,16 @@ class RespondCoinState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondCoinState: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, coin_ids: Union[ list[bytes32], _Unspec] = _Unspec(), + coin_states: Union[ list[CoinState], _Unspec] = _Unspec()) -> RespondCoinState: ... @final class RejectCoinState: @@ -3928,14 +3928,14 @@ class RejectCoinState: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectCoinState: ... @final @@ -3960,14 +3960,14 @@ class SubEpochData: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec(), @@ -4015,14 +4015,14 @@ class SubSlotData: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, proof_of_space: Union[ Optional[ProofOfSpace], _Unspec] = _Unspec(), cc_signage_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), cc_infusion_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -4040,7 +4040,7 @@ class SubSlotData: @final class SubEpochChallengeSegment: sub_epoch_n: uint32 - sub_slots: List[SubSlotData] + sub_slots: list[SubSlotData] rc_slot_end_info: Optional[VDFInfo] def __init__( self, @@ -4057,21 +4057,21 @@ class SubEpochChallengeSegment: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, sub_epoch_n: Union[ uint32, _Unspec] = _Unspec(), - sub_slots: Union[ List[SubSlotData], _Unspec] = _Unspec(), + sub_slots: Union[ list[SubSlotData], _Unspec] = _Unspec(), rc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec()) -> SubEpochChallengeSegment: ... @final class SubEpochSegments: - challenge_segments: List[SubEpochChallengeSegment] + challenge_segments: list[SubEpochChallengeSegment] def __init__( self, challenge_segments: Sequence[SubEpochChallengeSegment] @@ -4085,19 +4085,19 @@ class SubEpochSegments: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, challenge_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec()) -> SubEpochSegments: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, challenge_segments: Union[ list[SubEpochChallengeSegment], _Unspec] = _Unspec()) -> SubEpochSegments: ... @final class RecentChainData: - recent_chain_data: List[HeaderBlock] + recent_chain_data: list[HeaderBlock] def __init__( self, recent_chain_data: Sequence[HeaderBlock] @@ -4111,19 +4111,19 @@ class RecentChainData: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RecentChainData: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, recent_chain_data: Union[ list[HeaderBlock], _Unspec] = _Unspec()) -> RecentChainData: ... @final class ProofBlockHeader: - finished_sub_slots: List[EndOfSubSlotBundle] + finished_sub_slots: list[EndOfSubSlotBundle] reward_chain_block: RewardChainBlock def __init__( self, @@ -4139,22 +4139,22 @@ class ProofBlockHeader: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, finished_sub_slots: Union[ list[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec()) -> ProofBlockHeader: ... @final class WeightProof: - sub_epochs: List[SubEpochData] - sub_epoch_segments: List[SubEpochChallengeSegment] - recent_chain_data: List[HeaderBlock] + sub_epochs: list[SubEpochData] + sub_epoch_segments: list[SubEpochChallengeSegment] + recent_chain_data: list[HeaderBlock] def __init__( self, sub_epochs: Sequence[SubEpochData], @@ -4170,17 +4170,17 @@ class WeightProof: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... - def replace(self, *, sub_epochs: Union[ List[SubEpochData], _Unspec] = _Unspec(), - sub_epoch_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec(), - recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> WeightProof: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... + def replace(self, *, sub_epochs: Union[ list[SubEpochData], _Unspec] = _Unspec(), + sub_epoch_segments: Union[ list[SubEpochChallengeSegment], _Unspec] = _Unspec(), + recent_chain_data: Union[ list[HeaderBlock], _Unspec] = _Unspec()) -> WeightProof: ... @final class ConsensusConstants: @@ -4288,14 +4288,14 @@ class ConsensusConstants: @classmethod def from_bytes_unchecked(cls, blob: bytes) -> Self: ... @classmethod - def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> Tuple[Self, int]: ... + def parse_rust(cls, blob: ReadableBuffer, trusted: bool = False) -> tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... + def to_json_dict(self) -> dict[str, Any]: ... @classmethod - def from_json_dict(cls, json_dict: Any) -> Self: ... + def from_json_dict(cls, json_dict: dict[str, Any]) -> Self: ... def replace(self, *, SLOT_BLOCKS_TARGET: Union[ uint32, _Unspec] = _Unspec(), MIN_BLOCKS_PER_CHALLENGE_BLOCK: Union[ uint8, _Unspec] = _Unspec(), MAX_SUB_SLOT_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), diff --git a/wheel/python/chia_rs/sized_byte_class.py b/wheel/python/chia_rs/sized_byte_class.py index 6dcbeb11e..e34eecb44 100644 --- a/wheel/python/chia_rs/sized_byte_class.py +++ b/wheel/python/chia_rs/sized_byte_class.py @@ -8,7 +8,6 @@ Optional, SupportsBytes, SupportsIndex, - Type, TypeVar, Union, ) @@ -46,7 +45,7 @@ def __init__(self, v: Union[Iterable[SupportsIndex], SupportsBytes]) -> None: raise ValueError(f"bad {type(self).__name__} initializer {v}") @classmethod - def parse(cls: Type[_T_SizedBytes], f: BinaryIO) -> _T_SizedBytes: + def parse(cls: type[_T_SizedBytes], f: BinaryIO) -> _T_SizedBytes: b = f.read(cls._size) return cls(b) @@ -54,18 +53,18 @@ def stream(self, f: BinaryIO) -> None: f.write(self) @classmethod - def from_bytes(cls: Type[_T_SizedBytes], blob: bytes) -> _T_SizedBytes: + def from_bytes(cls: type[_T_SizedBytes], blob: bytes) -> _T_SizedBytes: return cls(blob) @classmethod - def from_hexstr(cls: Type[_T_SizedBytes], input_str: str) -> _T_SizedBytes: + def from_hexstr(cls: type[_T_SizedBytes], input_str: str) -> _T_SizedBytes: if input_str.startswith("0x") or input_str.startswith("0X"): return cls.fromhex(input_str[2:]) return cls.fromhex(input_str) @classmethod def random( - cls: Type[_T_SizedBytes], r: Optional[random.Random] = None + cls: type[_T_SizedBytes], r: Optional[random.Random] = None ) -> _T_SizedBytes: if r is None: getrandbits = random.getrandbits @@ -75,7 +74,7 @@ def random( return cls(getrandbits(cls._size * 8).to_bytes(cls._size, "big")) @classmethod - def secret(cls: Type[_T_SizedBytes]) -> _T_SizedBytes: + def secret(cls: type[_T_SizedBytes]) -> _T_SizedBytes: return cls.random(r=system_random) def __str__(self) -> str: diff --git a/wheel/python/chia_rs/struct_stream.py b/wheel/python/chia_rs/struct_stream.py index 6a4372b25..dd7d51759 100644 --- a/wheel/python/chia_rs/struct_stream.py +++ b/wheel/python/chia_rs/struct_stream.py @@ -6,7 +6,6 @@ Optional, SupportsIndex, SupportsInt, - Type, TypeVar, Union, ) @@ -21,7 +20,7 @@ class SupportsTrunc(Protocol): def __trunc__(self) -> int: ... -def parse_metadata_from_name(cls: Type[_T_StructStream]) -> Type[_T_StructStream]: +def parse_metadata_from_name(cls: type[_T_StructStream]) -> type[_T_StructStream]: name_signedness, _, name_bit_size = cls.__name__.partition("int") cls.SIGNED = False if name_signedness == "u" else True try: @@ -84,7 +83,7 @@ def __init__( @classmethod def construct_optional( - cls: Type[_T_StructStream], val: Optional[int] + cls: type[_T_StructStream], val: Optional[int] ) -> Optional[_T_StructStream]: if val is None: return None @@ -92,7 +91,7 @@ def construct_optional( return cls(val) @classmethod - def parse(cls: Type[_T_StructStream], f: BinaryIO) -> _T_StructStream: + def parse(cls: type[_T_StructStream], f: BinaryIO) -> _T_StructStream: read_bytes = f.read(cls.SIZE) return cls.from_bytes(read_bytes) @@ -100,7 +99,7 @@ def stream(self, f: BinaryIO) -> None: f.write(self.stream_to_bytes()) @classmethod - def from_bytes(cls: Type[_T_StructStream], blob: bytes) -> _T_StructStream: # type: ignore[override] + def from_bytes(cls: type[_T_StructStream], blob: bytes) -> _T_StructStream: # type: ignore[override] if len(blob) != cls.SIZE: raise ValueError( f"{cls.__name__}.from_bytes() requires {cls.SIZE} bytes but got: {len(blob)}"