From f42b81ebe470f370b6a6135362144ee24fe56965 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Mon, 8 Jul 2024 14:54:41 -0400 Subject: [PATCH 1/2] Subclassable spend bundle --- crates/chia-protocol/src/spend_bundle.rs | 2 +- crates/chia_streamable_macro/src/lib.rs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/chia-protocol/src/spend_bundle.rs b/crates/chia-protocol/src/spend_bundle.rs index 1db81fa7f..62778fa65 100644 --- a/crates/chia-protocol/src/spend_bundle.rs +++ b/crates/chia-protocol/src/spend_bundle.rs @@ -15,7 +15,7 @@ use clvmr::ENABLE_FIXED_DIV; #[cfg(feature = "py-bindings")] use pyo3::prelude::*; -#[streamable] +#[streamable(subclass)] pub struct SpendBundle { coin_spends: Vec, aggregated_signature: G2Element, diff --git a/crates/chia_streamable_macro/src/lib.rs b/crates/chia_streamable_macro/src/lib.rs index 50ac02048..357dbd16e 100644 --- a/crates/chia_streamable_macro/src/lib.rs +++ b/crates/chia_streamable_macro/src/lib.rs @@ -24,6 +24,7 @@ pub fn streamable(attr: TokenStream, item: TokenStream) -> TokenStream { }; let is_message = &attr.to_string() == "message"; + let is_subclass = &attr.to_string() == "subclass"; let mut input: DeriveInput = parse_macro_input!(item); let name = input.ident.clone(); @@ -92,13 +93,19 @@ pub fn streamable(attr: TokenStream, item: TokenStream) -> TokenStream { #[derive(chia_streamable_macro::Streamable, Hash, Debug, Clone, Eq, PartialEq)] }; + let class_attrs = if is_subclass { + quote!(frozen, subclass) + } else { + quote!(frozen) + }; + // If you're calling the macro from `chia-protocol`, enable Python bindings and arbitrary conditionally. // Otherwise, you're calling it from an external crate which doesn't have this infrastructure setup. // In that case, the caller can add these macros manually if they want to. let attrs = if matches!(found_crate, FoundCrate::Itself) { quote! { #[cfg_attr( - feature = "py-bindings", pyo3::pyclass(frozen), derive( + feature = "py-bindings", pyo3::pyclass(#class_attrs), derive( chia_py_streamable_macro::PyJsonDict, chia_py_streamable_macro::PyStreamable, chia_py_streamable_macro::PyGetters From 8de3fd310cf528935256f99e1f28dd2fdff4f369 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Mon, 8 Jul 2024 15:59:40 -0400 Subject: [PATCH 2/2] Add __new__ --- wheel/generate_type_stubs.py | 10 +- wheel/python/chia_rs/chia_rs.pyi | 811 ++++++++++++++++++++++++++++++- 2 files changed, 817 insertions(+), 4 deletions(-) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index a026e2040..cff05f737 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -50,6 +50,9 @@ class {name}:{"".join(map(add_indent, members))} def __init__( self{init_args} ) -> None: ... + def __new__( + cls{init_args} + ) -> {name}: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -356,6 +359,7 @@ def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuff class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... + def __new__(cls, cache_size: Optional[int] = 50000) -> BLSCache: ... def len(self) -> int: ... def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... def items(self) -> List[Tuple[bytes, bytes]]: ... @@ -388,6 +392,10 @@ def __init__( self, leafs: List[bytes32], ) -> None: ... + def __new__( + cls, + leafs: List[bytes32], + ) -> MerkleSet: ... """ ) @@ -397,7 +405,6 @@ def __init__( [], [ "SIZE: ClassVar[int] = ...", - "def __new__(cls) -> G1Element: ...", "def get_fingerprint(self) -> int: ...", "def verify(self, signature: G2Element, msg: bytes) -> bool: ...", "def pair(self, other: G2Element) -> GTElement: ...", @@ -415,7 +422,6 @@ def __init__( [], [ "SIZE: ClassVar[int] = ...", - "def __new__(cls) -> G2Element: ...", "def pair(self, other: G1Element) -> GTElement: ...", "@staticmethod", "def generator() -> G2Element: ...", diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 042aad34d..a23185312 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -100,6 +100,7 @@ def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuff class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... + def __new__(cls, cache_size: Optional[int] = 50000) -> BLSCache: ... def len(self) -> int: ... def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... def items(self) -> List[Tuple[bytes, bytes]]: ... @@ -132,10 +133,13 @@ class MerkleSet: self, leafs: List[bytes32], ) -> None: ... + def __new__( + cls, + leafs: List[bytes32], + ) -> MerkleSet: ... class G1Element: SIZE: ClassVar[int] = ... - def __new__(cls) -> G1Element: ... def get_fingerprint(self) -> int: ... def verify(self, signature: G2Element, msg: bytes) -> bool: ... def pair(self, other: G2Element) -> GTElement: ... @@ -148,6 +152,9 @@ class G1Element: def __init__( self ) -> None: ... + def __new__( + cls + ) -> G1Element: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -169,7 +176,6 @@ class G1Element: class G2Element: SIZE: ClassVar[int] = ... - def __new__(cls) -> G2Element: ... def pair(self, other: G1Element) -> GTElement: ... @staticmethod def generator() -> G2Element: ... @@ -179,6 +185,9 @@ class G2Element: def __init__( self ) -> None: ... + def __new__( + cls + ) -> G2Element: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -206,6 +215,9 @@ class GTElement: def __init__( self ) -> None: ... + def __new__( + cls + ) -> GTElement: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -238,6 +250,9 @@ class PrivateKey: def __init__( self ) -> None: ... + def __new__( + cls + ) -> PrivateKey: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -299,6 +314,28 @@ class Spend: agg_sig_parent_puzzle: Sequence[Tuple[G1Element, bytes]], flags: int ) -> None: ... + def __new__( + cls, + coin_id: bytes, + parent_id: bytes, + puzzle_hash: bytes, + coin_amount: int, + height_relative: Optional[int], + seconds_relative: Optional[int], + before_height_relative: Optional[int], + 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]], + flags: int + ) -> Spend: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -361,6 +398,19 @@ class SpendBundleConditions: removal_amount: int, addition_amount: int ) -> None: ... + def __new__( + cls, + spends: Sequence[Spend], + reserve_fee: int, + height_absolute: int, + seconds_absolute: int, + before_height_absolute: Optional[int], + before_seconds_absolute: Optional[int], + agg_sig_unsafe: Sequence[Tuple[G1Element, bytes]], + cost: int, + removal_amount: int, + addition_amount: int + ) -> SpendBundleConditions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -452,6 +502,34 @@ class BlockRecord: finished_reward_slot_hashes: Optional[Sequence[bytes32]], sub_epoch_summary_included: Optional[SubEpochSummary] ) -> None: ... + def __new__( + cls, + header_hash: bytes, + prev_hash: bytes, + height: uint32, + weight: uint128, + total_iters: uint128, + signage_point_index: uint8, + challenge_vdf_output: ClassgroupElement, + infused_challenge_vdf_output: Optional[ClassgroupElement], + reward_infusion_new_challenge: bytes, + challenge_block_info_hash: bytes, + sub_slot_iters: uint64, + pool_puzzle_hash: bytes, + farmer_puzzle_hash: bytes, + required_iters: uint64, + deficit: uint8, + overflow: bool, + prev_transaction_block_height: uint32, + timestamp: Optional[uint64], + prev_transaction_block_hash: Optional[bytes32], + fees: Optional[uint64], + reward_claims_incorporated: Optional[Sequence[Coin]], + finished_challenge_slot_hashes: Optional[Sequence[bytes32]], + finished_infused_challenge_slot_hashes: Optional[Sequence[bytes32]], + finished_reward_slot_hashes: Optional[Sequence[bytes32]], + sub_epoch_summary_included: Optional[SubEpochSummary] + ) -> BlockRecord: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -506,6 +584,12 @@ class Message: id: Optional[uint16], data: bytes ) -> None: ... + def __new__( + cls, + msg_type: int, + id: Optional[uint16], + data: bytes + ) -> Message: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -544,6 +628,15 @@ class Handshake: node_type: int, capabilities: Sequence[Tuple[uint16, str]] ) -> None: ... + def __new__( + cls, + network_id: str, + protocol_version: str, + software_version: str, + server_port: uint16, + node_type: int, + capabilities: Sequence[Tuple[uint16, str]] + ) -> Handshake: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -581,6 +674,10 @@ class ClassgroupElement: self, data: bytes100 ) -> None: ... + def __new__( + cls, + data: bytes100 + ) -> ClassgroupElement: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -612,6 +709,12 @@ class Coin: puzzle_hash: bytes, amount: uint64 ) -> None: ... + def __new__( + cls, + parent_coin_info: bytes, + puzzle_hash: bytes, + amount: uint64 + ) -> Coin: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -644,6 +747,12 @@ class CoinSpend: puzzle_reveal: Program, solution: Program ) -> None: ... + def __new__( + cls, + coin: Coin, + puzzle_reveal: Program, + solution: Program + ) -> CoinSpend: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -676,6 +785,12 @@ class CoinState: spent_height: Optional[uint32], created_height: Optional[uint32] ) -> None: ... + def __new__( + cls, + coin: Coin, + spent_height: Optional[uint32], + created_height: Optional[uint32] + ) -> CoinState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -710,6 +825,13 @@ class EndOfSubSlotBundle: reward_chain: RewardChainSubSlot, proofs: SubSlotProofs ) -> None: ... + def __new__( + cls, + challenge_chain: ChallengeChainSubSlot, + infused_challenge_chain: Optional[InfusedChallengeChainSubSlot], + reward_chain: RewardChainSubSlot, + proofs: SubSlotProofs + ) -> EndOfSubSlotBundle: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -739,6 +861,10 @@ class FeeRate: self, mojos_per_clvm_cost: uint64 ) -> None: ... + def __new__( + cls, + mojos_per_clvm_cost: uint64 + ) -> FeeRate: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -769,6 +895,12 @@ class FeeEstimate: time_target: uint64, estimated_fee_rate: FeeRate ) -> None: ... + def __new__( + cls, + error: Optional[str], + time_target: uint64, + estimated_fee_rate: FeeRate + ) -> FeeEstimate: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -799,6 +931,11 @@ class FeeEstimateGroup: error: Optional[str], estimates: Sequence[FeeEstimate] ) -> None: ... + def __new__( + cls, + error: Optional[str], + estimates: Sequence[FeeEstimate] + ) -> FeeEstimateGroup: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -836,6 +973,15 @@ class TransactionsInfo: cost: uint64, reward_claims_incorporated: Sequence[Coin] ) -> None: ... + def __new__( + cls, + generator_root: bytes, + generator_refs_root: bytes, + aggregated_signature: G2Element, + fees: uint64, + cost: uint64, + reward_claims_incorporated: Sequence[Coin] + ) -> TransactionsInfo: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -877,6 +1023,15 @@ class FoliageTransactionBlock: removals_root: bytes, transactions_info_hash: bytes ) -> None: ... + def __new__( + cls, + prev_transaction_block_hash: bytes, + timestamp: uint64, + filter_hash: bytes, + additions_root: bytes, + removals_root: bytes, + transactions_info_hash: bytes + ) -> FoliageTransactionBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -916,6 +1071,14 @@ class FoliageBlockData: farmer_reward_puzzle_hash: bytes, extension_data: bytes ) -> None: ... + def __new__( + cls, + unfinished_reward_block_hash: bytes, + pool_target: PoolTarget, + pool_signature: Optional[G2Element], + farmer_reward_puzzle_hash: bytes, + extension_data: bytes + ) -> FoliageBlockData: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -956,6 +1119,15 @@ class Foliage: foliage_transaction_block_hash: Optional[bytes32], foliage_transaction_block_signature: Optional[G2Element] ) -> None: ... + def __new__( + cls, + prev_block_hash: bytes, + reward_block_hash: bytes, + foliage_block_data: FoliageBlockData, + foliage_block_data_signature: G2Element, + foliage_transaction_block_hash: Optional[bytes32], + foliage_transaction_block_signature: Optional[G2Element] + ) -> Foliage: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -995,6 +1167,14 @@ class NewPeak: fork_point_with_previous_peak: uint32, unfinished_reward_block_hash: bytes ) -> None: ... + def __new__( + cls, + header_hash: bytes, + height: uint32, + weight: uint128, + fork_point_with_previous_peak: uint32, + unfinished_reward_block_hash: bytes + ) -> NewPeak: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1029,6 +1209,12 @@ class NewTransaction: cost: uint64, fees: uint64 ) -> None: ... + def __new__( + cls, + transaction_id: bytes, + cost: uint64, + fees: uint64 + ) -> NewTransaction: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1057,6 +1243,10 @@ class RequestTransaction: self, transaction_id: bytes ) -> None: ... + def __new__( + cls, + transaction_id: bytes + ) -> RequestTransaction: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1083,6 +1273,10 @@ class RespondTransaction: self, transaction: SpendBundle ) -> None: ... + def __new__( + cls, + transaction: SpendBundle + ) -> RespondTransaction: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1111,6 +1305,11 @@ class RequestProofOfWeight: total_number_of_blocks: uint32, tip: bytes ) -> None: ... + def __new__( + cls, + total_number_of_blocks: uint32, + tip: bytes + ) -> RequestProofOfWeight: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1140,6 +1339,11 @@ class RespondProofOfWeight: wp: WeightProof, tip: bytes ) -> None: ... + def __new__( + cls, + wp: WeightProof, + tip: bytes + ) -> RespondProofOfWeight: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1169,6 +1373,11 @@ class RequestBlock: height: uint32, include_transaction_block: bool ) -> None: ... + def __new__( + cls, + height: uint32, + include_transaction_block: bool + ) -> RequestBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1196,6 +1405,10 @@ class RejectBlock: self, height: uint32 ) -> None: ... + def __new__( + cls, + height: uint32 + ) -> RejectBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1226,6 +1439,12 @@ class RequestBlocks: end_height: uint32, include_transaction_block: bool ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32, + include_transaction_block: bool + ) -> RequestBlocks: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1258,6 +1477,12 @@ class RespondBlocks: end_height: uint32, blocks: Sequence[FullBlock] ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32, + blocks: Sequence[FullBlock] + ) -> RespondBlocks: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1288,6 +1513,11 @@ class RejectBlocks: start_height: uint32, end_height: uint32 ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32 + ) -> RejectBlocks: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1315,6 +1545,10 @@ class RespondBlock: self, block: FullBlock ) -> None: ... + def __new__( + cls, + block: FullBlock + ) -> RespondBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1341,6 +1575,10 @@ class NewUnfinishedBlock: self, unfinished_reward_hash: bytes ) -> None: ... + def __new__( + cls, + unfinished_reward_hash: bytes + ) -> NewUnfinishedBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1367,6 +1605,10 @@ class RequestUnfinishedBlock: self, unfinished_reward_hash: bytes ) -> None: ... + def __new__( + cls, + unfinished_reward_hash: bytes + ) -> RequestUnfinishedBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1393,6 +1635,10 @@ class RespondUnfinishedBlock: self, unfinished_block: UnfinishedBlock ) -> None: ... + def __new__( + cls, + unfinished_block: UnfinishedBlock + ) -> RespondUnfinishedBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1425,6 +1671,13 @@ class NewSignagePointOrEndOfSubSlot: index_from_challenge: uint8, last_rc_infusion: bytes ) -> None: ... + def __new__( + cls, + prev_challenge_hash: Optional[bytes32], + challenge_hash: bytes, + index_from_challenge: uint8, + last_rc_infusion: bytes + ) -> NewSignagePointOrEndOfSubSlot: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1458,6 +1711,12 @@ class RequestSignagePointOrEndOfSubSlot: index_from_challenge: uint8, last_rc_infusion: bytes ) -> None: ... + def __new__( + cls, + challenge_hash: bytes, + index_from_challenge: uint8, + last_rc_infusion: bytes + ) -> RequestSignagePointOrEndOfSubSlot: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1494,6 +1753,14 @@ class RespondSignagePoint: reward_chain_vdf: VDFInfo, reward_chain_proof: VDFProof ) -> None: ... + def __new__( + cls, + index_from_challenge: uint8, + challenge_chain_vdf: VDFInfo, + challenge_chain_proof: VDFProof, + reward_chain_vdf: VDFInfo, + reward_chain_proof: VDFProof + ) -> RespondSignagePoint: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1524,6 +1791,10 @@ class RespondEndOfSubSlot: self, end_of_slot_bundle: EndOfSubSlotBundle ) -> None: ... + def __new__( + cls, + end_of_slot_bundle: EndOfSubSlotBundle + ) -> RespondEndOfSubSlot: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1550,6 +1821,10 @@ class RequestMempoolTransactions: self, filter: bytes ) -> None: ... + def __new__( + cls, + filter: bytes + ) -> RequestMempoolTransactions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1582,6 +1857,13 @@ class NewCompactVDF: field_vdf: uint8, vdf_info: VDFInfo ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes, + field_vdf: uint8, + vdf_info: VDFInfo + ) -> NewCompactVDF: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1617,6 +1899,13 @@ class RequestCompactVDF: field_vdf: uint8, vdf_info: VDFInfo ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes, + field_vdf: uint8, + vdf_info: VDFInfo + ) -> RequestCompactVDF: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1654,6 +1943,14 @@ class RespondCompactVDF: vdf_info: VDFInfo, vdf_proof: VDFProof ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes, + field_vdf: uint8, + vdf_info: VDFInfo, + vdf_proof: VDFProof + ) -> RespondCompactVDF: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1682,6 +1979,9 @@ class RequestPeers: def __init__( self ) -> None: ... + def __new__( + cls + ) -> RequestPeers: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1707,6 +2007,10 @@ class RespondPeers: self, peer_list: Sequence[TimestampedPeerInfo] ) -> None: ... + def __new__( + cls, + peer_list: Sequence[TimestampedPeerInfo] + ) -> RespondPeers: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1735,6 +2039,11 @@ class NewUnfinishedBlock2: unfinished_reward_hash: bytes, foliage_hash: Optional[bytes32] ) -> None: ... + def __new__( + cls, + unfinished_reward_hash: bytes, + foliage_hash: Optional[bytes32] + ) -> NewUnfinishedBlock2: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1764,6 +2073,11 @@ class RequestUnfinishedBlock2: unfinished_reward_hash: bytes, foliage_hash: Optional[bytes32] ) -> None: ... + def __new__( + cls, + unfinished_reward_hash: bytes, + foliage_hash: Optional[bytes32] + ) -> RequestUnfinishedBlock2: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1821,6 +2135,21 @@ class FullBlock: transactions_generator: Optional[Program], transactions_generator_ref_list: Sequence[uint32] ) -> None: ... + def __new__( + cls, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlock, + challenge_chain_sp_proof: Optional[VDFProof], + challenge_chain_ip_proof: VDFProof, + reward_chain_sp_proof: Optional[VDFProof], + reward_chain_ip_proof: VDFProof, + infused_challenge_chain_ip_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_info: Optional[TransactionsInfo], + transactions_generator: Optional[Program], + transactions_generator_ref_list: Sequence[uint32] + ) -> FullBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1887,6 +2216,20 @@ class HeaderBlock: transactions_filter: bytes, transactions_info: Optional[TransactionsInfo] ) -> None: ... + def __new__( + cls, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlock, + challenge_chain_sp_proof: Optional[VDFProof], + challenge_chain_ip_proof: VDFProof, + reward_chain_sp_proof: Optional[VDFProof], + reward_chain_ip_proof: VDFProof, + infused_challenge_chain_ip_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_filter: bytes, + transactions_info: Optional[TransactionsInfo] + ) -> HeaderBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1927,6 +2270,12 @@ class TimestampedPeerInfo: port: uint16, timestamp: uint64 ) -> None: ... + def __new__( + cls, + host: str, + port: uint16, + timestamp: uint64 + ) -> TimestampedPeerInfo: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1957,6 +2306,11 @@ class PoolTarget: puzzle_hash: bytes, max_height: uint32 ) -> None: ... + def __new__( + cls, + puzzle_hash: bytes, + max_height: uint32 + ) -> PoolTarget: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -1998,6 +2352,10 @@ class Program: self, a0: bytes ) -> None: ... + def __new__( + cls, + a0: bytes + ) -> Program: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2034,6 +2392,15 @@ class ProofOfSpace: size: uint8, proof: bytes ) -> None: ... + def __new__( + cls, + challenge: bytes, + pool_public_key: Optional[G1Element], + pool_contract_puzzle_hash: Optional[bytes32], + plot_public_key: G1Element, + size: uint8, + proof: bytes + ) -> ProofOfSpace: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2079,6 +2446,17 @@ class RewardChainBlockUnfinished: reward_chain_sp_vdf: Optional[VDFInfo], reward_chain_sp_signature: G2Element ) -> None: ... + def __new__( + cls, + total_iters: uint128, + signage_point_index: uint8, + pos_ss_cc_challenge_hash: bytes, + proof_of_space: ProofOfSpace, + challenge_chain_sp_vdf: Optional[VDFInfo], + challenge_chain_sp_signature: G2Element, + reward_chain_sp_vdf: Optional[VDFInfo], + reward_chain_sp_signature: G2Element + ) -> RewardChainBlockUnfinished: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2139,6 +2517,23 @@ class RewardChainBlock: infused_challenge_chain_ip_vdf: Optional[VDFInfo], is_transaction_block: bool ) -> None: ... + def __new__( + cls, + weight: uint128, + height: uint32, + total_iters: uint128, + signage_point_index: uint8, + pos_ss_cc_challenge_hash: bytes, + proof_of_space: ProofOfSpace, + challenge_chain_sp_vdf: Optional[VDFInfo], + challenge_chain_sp_signature: G2Element, + challenge_chain_ip_vdf: VDFInfo, + reward_chain_sp_vdf: Optional[VDFInfo], + reward_chain_sp_signature: G2Element, + reward_chain_ip_vdf: VDFInfo, + infused_challenge_chain_ip_vdf: Optional[VDFInfo], + is_transaction_block: bool + ) -> RewardChainBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2184,6 +2579,13 @@ class ChallengeBlockInfo: challenge_chain_sp_signature: G2Element, challenge_chain_ip_vdf: VDFInfo ) -> None: ... + def __new__( + cls, + proof_of_space: ProofOfSpace, + challenge_chain_sp_vdf: Optional[VDFInfo], + challenge_chain_sp_signature: G2Element, + challenge_chain_ip_vdf: VDFInfo + ) -> ChallengeBlockInfo: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2221,6 +2623,14 @@ class ChallengeChainSubSlot: new_sub_slot_iters: Optional[uint64], new_difficulty: Optional[uint64] ) -> None: ... + def __new__( + cls, + challenge_chain_end_of_slot_vdf: VDFInfo, + infused_challenge_chain_sub_slot_hash: Optional[bytes32], + subepoch_summary_hash: Optional[bytes32], + new_sub_slot_iters: Optional[uint64], + new_difficulty: Optional[uint64] + ) -> ChallengeChainSubSlot: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2251,6 +2661,10 @@ class InfusedChallengeChainSubSlot: self, infused_challenge_chain_end_of_slot_vdf: VDFInfo ) -> None: ... + def __new__( + cls, + infused_challenge_chain_end_of_slot_vdf: VDFInfo + ) -> InfusedChallengeChainSubSlot: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2283,6 +2697,13 @@ class RewardChainSubSlot: infused_challenge_chain_sub_slot_hash: Optional[bytes32], deficit: uint8 ) -> None: ... + def __new__( + cls, + end_of_slot_vdf: VDFInfo, + challenge_chain_sub_slot_hash: bytes, + infused_challenge_chain_sub_slot_hash: Optional[bytes32], + deficit: uint8 + ) -> RewardChainSubSlot: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2316,6 +2737,12 @@ class SubSlotProofs: infused_challenge_chain_slot_proof: Optional[VDFProof], reward_chain_slot_proof: VDFProof ) -> None: ... + def __new__( + cls, + challenge_chain_slot_proof: VDFProof, + infused_challenge_chain_slot_proof: Optional[VDFProof], + reward_chain_slot_proof: VDFProof + ) -> SubSlotProofs: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2351,6 +2778,11 @@ class SpendBundle: coin_spends: Sequence[CoinSpend], aggregated_signature: G2Element ) -> None: ... + def __new__( + cls, + coin_spends: Sequence[CoinSpend], + aggregated_signature: G2Element + ) -> SpendBundle: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2386,6 +2818,14 @@ class SubEpochSummary: new_difficulty: Optional[uint64], new_sub_slot_iters: Optional[uint64] ) -> None: ... + def __new__( + cls, + prev_subepoch_summary_hash: bytes, + reward_chain_hash: bytes, + num_blocks_overflow: uint8, + new_difficulty: Optional[uint64], + new_sub_slot_iters: Optional[uint64] + ) -> SubEpochSummary: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2436,6 +2876,18 @@ class UnfinishedBlock: transactions_generator: Optional[Program], transactions_generator_ref_list: Sequence[uint32] ) -> None: ... + def __new__( + cls, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlockUnfinished, + challenge_chain_sp_proof: Optional[VDFProof], + reward_chain_sp_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_info: Optional[TransactionsInfo], + transactions_generator: Optional[Program], + transactions_generator_ref_list: Sequence[uint32] + ) -> UnfinishedBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2485,6 +2937,16 @@ class UnfinishedHeaderBlock: foliage_transaction_block: Optional[FoliageTransactionBlock], transactions_filter: bytes ) -> None: ... + def __new__( + cls, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlockUnfinished, + challenge_chain_sp_proof: Optional[VDFProof], + reward_chain_sp_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_filter: bytes + ) -> UnfinishedHeaderBlock: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2521,6 +2983,12 @@ class VDFInfo: number_of_iterations: uint64, output: ClassgroupElement ) -> None: ... + def __new__( + cls, + challenge: bytes, + number_of_iterations: uint64, + output: ClassgroupElement + ) -> VDFInfo: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2553,6 +3021,12 @@ class VDFProof: witness: bytes, normalized_to_identity: bool ) -> None: ... + def __new__( + cls, + witness_type: uint8, + witness: bytes, + normalized_to_identity: bool + ) -> VDFProof: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2583,6 +3057,11 @@ class RequestPuzzleSolution: coin_name: bytes, height: uint32 ) -> None: ... + def __new__( + cls, + coin_name: bytes, + height: uint32 + ) -> RequestPuzzleSolution: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2616,6 +3095,13 @@ class PuzzleSolutionResponse: puzzle: Program, solution: Program ) -> None: ... + def __new__( + cls, + coin_name: bytes, + height: uint32, + puzzle: Program, + solution: Program + ) -> PuzzleSolutionResponse: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2645,6 +3131,10 @@ class RespondPuzzleSolution: self, response: PuzzleSolutionResponse ) -> None: ... + def __new__( + cls, + response: PuzzleSolutionResponse + ) -> RespondPuzzleSolution: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2673,6 +3163,11 @@ class RejectPuzzleSolution: coin_name: bytes, height: uint32 ) -> None: ... + def __new__( + cls, + coin_name: bytes, + height: uint32 + ) -> RejectPuzzleSolution: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2700,6 +3195,10 @@ class SendTransaction: self, transaction: SpendBundle ) -> None: ... + def __new__( + cls, + transaction: SpendBundle + ) -> SendTransaction: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2730,6 +3229,12 @@ class TransactionAck: status: uint8, error: Optional[str] ) -> None: ... + def __new__( + cls, + txid: bytes, + status: uint8, + error: Optional[str] + ) -> TransactionAck: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2764,6 +3269,13 @@ class NewPeakWallet: weight: uint128, fork_point_with_previous_peak: uint32 ) -> None: ... + def __new__( + cls, + header_hash: bytes, + height: uint32, + weight: uint128, + fork_point_with_previous_peak: uint32 + ) -> NewPeakWallet: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2793,6 +3305,10 @@ class RequestBlockHeader: self, height: uint32 ) -> None: ... + def __new__( + cls, + height: uint32 + ) -> RequestBlockHeader: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2819,6 +3335,10 @@ class RespondBlockHeader: self, header_block: HeaderBlock ) -> None: ... + def __new__( + cls, + header_block: HeaderBlock + ) -> RespondBlockHeader: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2845,6 +3365,10 @@ class RejectHeaderRequest: self, height: uint32 ) -> None: ... + def __new__( + cls, + height: uint32 + ) -> RejectHeaderRequest: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2875,6 +3399,12 @@ class RequestRemovals: header_hash: bytes, coin_names: Optional[Sequence[bytes32]] ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes, + coin_names: Optional[Sequence[bytes32]] + ) -> RequestRemovals: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2909,6 +3439,13 @@ class RespondRemovals: coins: Sequence[Tuple[bytes32, Optional[Coin]]], proofs: Optional[Sequence[Tuple[bytes32, bytes]]] ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes, + coins: Sequence[Tuple[bytes32, Optional[Coin]]], + proofs: Optional[Sequence[Tuple[bytes32, bytes]]] + ) -> RespondRemovals: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2940,6 +3477,11 @@ class RejectRemovalsRequest: height: uint32, header_hash: bytes ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes + ) -> RejectRemovalsRequest: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -2971,6 +3513,12 @@ class RequestAdditions: header_hash: Optional[bytes32], puzzle_hashes: Optional[Sequence[bytes32]] ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: Optional[bytes32], + puzzle_hashes: Optional[Sequence[bytes32]] + ) -> RequestAdditions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3005,6 +3553,13 @@ class RespondAdditions: coins: Sequence[Tuple[bytes32, Sequence[Coin]]], proofs: Optional[Sequence[Tuple[bytes32, bytes, Optional[bytes]]]] ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes, + coins: Sequence[Tuple[bytes32, Sequence[Coin]]], + proofs: Optional[Sequence[Tuple[bytes32, bytes, Optional[bytes]]]] + ) -> RespondAdditions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3036,6 +3591,11 @@ class RejectAdditionsRequest: height: uint32, header_hash: bytes ) -> None: ... + def __new__( + cls, + height: uint32, + header_hash: bytes + ) -> RejectAdditionsRequest: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3067,6 +3627,12 @@ class RespondBlockHeaders: end_height: uint32, header_blocks: Sequence[HeaderBlock] ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32, + header_blocks: Sequence[HeaderBlock] + ) -> RespondBlockHeaders: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3097,6 +3663,11 @@ class RejectBlockHeaders: start_height: uint32, end_height: uint32 ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32 + ) -> RejectBlockHeaders: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3128,6 +3699,12 @@ class RequestBlockHeaders: end_height: uint32, return_filter: bool ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32, + return_filter: bool + ) -> RequestBlockHeaders: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3158,6 +3735,11 @@ class RequestHeaderBlocks: start_height: uint32, end_height: uint32 ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32 + ) -> RequestHeaderBlocks: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3187,6 +3769,11 @@ class RejectHeaderBlocks: start_height: uint32, end_height: uint32 ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32 + ) -> RejectHeaderBlocks: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3218,6 +3805,12 @@ class RespondHeaderBlocks: end_height: uint32, header_blocks: Sequence[HeaderBlock] ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32, + header_blocks: Sequence[HeaderBlock] + ) -> RespondHeaderBlocks: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3248,6 +3841,11 @@ class RegisterForPhUpdates: puzzle_hashes: Sequence[bytes32], min_height: uint32 ) -> None: ... + def __new__( + cls, + puzzle_hashes: Sequence[bytes32], + min_height: uint32 + ) -> RegisterForPhUpdates: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3279,6 +3877,12 @@ class RespondToPhUpdates: min_height: uint32, coin_states: Sequence[CoinState] ) -> None: ... + def __new__( + cls, + puzzle_hashes: Sequence[bytes32], + min_height: uint32, + coin_states: Sequence[CoinState] + ) -> RespondToPhUpdates: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3309,6 +3913,11 @@ class RegisterForCoinUpdates: coin_ids: Sequence[bytes32], min_height: uint32 ) -> None: ... + def __new__( + cls, + coin_ids: Sequence[bytes32], + min_height: uint32 + ) -> RegisterForCoinUpdates: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3340,6 +3949,12 @@ class RespondToCoinUpdates: min_height: uint32, coin_states: Sequence[CoinState] ) -> None: ... + def __new__( + cls, + coin_ids: Sequence[bytes32], + min_height: uint32, + coin_states: Sequence[CoinState] + ) -> RespondToCoinUpdates: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3374,6 +3989,13 @@ class CoinStateUpdate: peak_hash: bytes, items: Sequence[CoinState] ) -> None: ... + def __new__( + cls, + height: uint32, + fork_height: uint32, + peak_hash: bytes, + items: Sequence[CoinState] + ) -> CoinStateUpdate: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3403,6 +4025,10 @@ class RequestChildren: self, coin_name: bytes ) -> None: ... + def __new__( + cls, + coin_name: bytes + ) -> RequestChildren: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3429,6 +4055,10 @@ class RespondChildren: self, coin_states: Sequence[CoinState] ) -> None: ... + def __new__( + cls, + coin_states: Sequence[CoinState] + ) -> RespondChildren: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3457,6 +4087,11 @@ class RequestSesInfo: start_height: uint32, end_height: uint32 ) -> None: ... + def __new__( + cls, + start_height: uint32, + end_height: uint32 + ) -> RequestSesInfo: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3486,6 +4121,11 @@ class RespondSesInfo: reward_chain_hash: Sequence[bytes32], heights: Sequence[Sequence[uint32]] ) -> None: ... + def __new__( + cls, + reward_chain_hash: Sequence[bytes32], + heights: Sequence[Sequence[uint32]] + ) -> RespondSesInfo: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3513,6 +4153,10 @@ class RequestFeeEstimates: self, time_targets: Sequence[uint64] ) -> None: ... + def __new__( + cls, + time_targets: Sequence[uint64] + ) -> RequestFeeEstimates: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3539,6 +4183,10 @@ class RespondFeeEstimates: self, estimates: FeeEstimateGroup ) -> None: ... + def __new__( + cls, + estimates: FeeEstimateGroup + ) -> RespondFeeEstimates: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3565,6 +4213,10 @@ class RequestRemovePuzzleSubscriptions: self, puzzle_hashes: Optional[Sequence[bytes32]] ) -> None: ... + def __new__( + cls, + puzzle_hashes: Optional[Sequence[bytes32]] + ) -> RequestRemovePuzzleSubscriptions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3591,6 +4243,10 @@ class RespondRemovePuzzleSubscriptions: self, puzzle_hashes: Sequence[bytes32] ) -> None: ... + def __new__( + cls, + puzzle_hashes: Sequence[bytes32] + ) -> RespondRemovePuzzleSubscriptions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3617,6 +4273,10 @@ class RequestRemoveCoinSubscriptions: self, coin_ids: Optional[Sequence[bytes32]] ) -> None: ... + def __new__( + cls, + coin_ids: Optional[Sequence[bytes32]] + ) -> RequestRemoveCoinSubscriptions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3643,6 +4303,10 @@ class RespondRemoveCoinSubscriptions: self, coin_ids: Sequence[bytes32] ) -> None: ... + def __new__( + cls, + coin_ids: Sequence[bytes32] + ) -> RespondRemoveCoinSubscriptions: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3675,6 +4339,13 @@ class CoinStateFilters: include_hinted: bool, min_amount: uint64 ) -> None: ... + def __new__( + cls, + include_spent: bool, + include_unspent: bool, + include_hinted: bool, + min_amount: uint64 + ) -> CoinStateFilters: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3712,6 +4383,14 @@ class RequestPuzzleState: filters: CoinStateFilters, subscribe_when_finished: bool ) -> None: ... + def __new__( + cls, + puzzle_hashes: Sequence[bytes32], + previous_height: Optional[uint32], + header_hash: bytes, + filters: CoinStateFilters, + subscribe_when_finished: bool + ) -> RequestPuzzleState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3750,6 +4429,14 @@ class RespondPuzzleState: is_finished: bool, coin_states: Sequence[CoinState] ) -> None: ... + def __new__( + cls, + puzzle_hashes: Sequence[bytes32], + height: uint32, + header_hash: bytes, + is_finished: bool, + coin_states: Sequence[CoinState] + ) -> RespondPuzzleState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3780,6 +4467,10 @@ class RejectPuzzleState: self, reason: int ) -> None: ... + def __new__( + cls, + reason: int + ) -> RejectPuzzleState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3812,6 +4503,13 @@ class RequestCoinState: header_hash: bytes, subscribe: bool ) -> None: ... + def __new__( + cls, + coin_ids: Sequence[bytes32], + previous_height: Optional[uint32], + header_hash: bytes, + subscribe: bool + ) -> RequestCoinState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3843,6 +4541,11 @@ class RespondCoinState: coin_ids: Sequence[bytes32], coin_states: Sequence[CoinState] ) -> None: ... + def __new__( + cls, + coin_ids: Sequence[bytes32], + coin_states: Sequence[CoinState] + ) -> RespondCoinState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3870,6 +4573,10 @@ class RejectCoinState: self, reason: int ) -> None: ... + def __new__( + cls, + reason: int + ) -> RejectCoinState: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3902,6 +4609,13 @@ class SubEpochData: new_sub_slot_iters: Optional[uint64], new_difficulty: Optional[uint64] ) -> None: ... + def __new__( + cls, + reward_chain_hash: bytes, + num_blocks_overflow: uint8, + new_sub_slot_iters: Optional[uint64], + new_difficulty: Optional[uint64] + ) -> SubEpochData: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3957,6 +4671,22 @@ class SubSlotData: icc_ip_vdf_info: Optional[VDFInfo], total_iters: Optional[uint128] ) -> None: ... + def __new__( + cls, + proof_of_space: Optional[ProofOfSpace], + cc_signage_point: Optional[VDFProof], + cc_infusion_point: Optional[VDFProof], + icc_infusion_point: Optional[VDFProof], + cc_sp_vdf_info: Optional[VDFInfo], + signage_point_index: Optional[uint8], + cc_slot_end: Optional[VDFProof], + icc_slot_end: Optional[VDFProof], + cc_slot_end_info: Optional[VDFInfo], + icc_slot_end_info: Optional[VDFInfo], + cc_ip_vdf_info: Optional[VDFInfo], + icc_ip_vdf_info: Optional[VDFInfo], + total_iters: Optional[uint128] + ) -> SubSlotData: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -3999,6 +4729,12 @@ class SubEpochChallengeSegment: sub_slots: Sequence[SubSlotData], rc_slot_end_info: Optional[VDFInfo] ) -> None: ... + def __new__( + cls, + sub_epoch_n: uint32, + sub_slots: Sequence[SubSlotData], + rc_slot_end_info: Optional[VDFInfo] + ) -> SubEpochChallengeSegment: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -4027,6 +4763,10 @@ class SubEpochSegments: self, challenge_segments: Sequence[SubEpochChallengeSegment] ) -> None: ... + def __new__( + cls, + challenge_segments: Sequence[SubEpochChallengeSegment] + ) -> SubEpochSegments: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -4053,6 +4793,10 @@ class RecentChainData: self, recent_chain_data: Sequence[HeaderBlock] ) -> None: ... + def __new__( + cls, + recent_chain_data: Sequence[HeaderBlock] + ) -> RecentChainData: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -4081,6 +4825,11 @@ class ProofBlockHeader: finished_sub_slots: Sequence[EndOfSubSlotBundle], reward_chain_block: RewardChainBlock ) -> None: ... + def __new__( + cls, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlock + ) -> ProofBlockHeader: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -4112,6 +4861,12 @@ class WeightProof: sub_epoch_segments: Sequence[SubEpochChallengeSegment], recent_chain_data: Sequence[HeaderBlock] ) -> None: ... + def __new__( + cls, + sub_epochs: Sequence[SubEpochData], + sub_epoch_segments: Sequence[SubEpochChallengeSegment], + recent_chain_data: Sequence[HeaderBlock] + ) -> WeightProof: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... @@ -4236,6 +4991,58 @@ class ConsensusConstants: PLOT_FILTER_64_HEIGHT: uint32, PLOT_FILTER_32_HEIGHT: uint32 ) -> None: ... + def __new__( + cls, + SLOT_BLOCKS_TARGET: uint32, + MIN_BLOCKS_PER_CHALLENGE_BLOCK: uint8, + MAX_SUB_SLOT_BLOCKS: uint32, + NUM_SPS_SUB_SLOT: uint32, + SUB_SLOT_ITERS_STARTING: uint64, + DIFFICULTY_CONSTANT_FACTOR: uint128, + DIFFICULTY_STARTING: uint64, + DIFFICULTY_CHANGE_MAX_FACTOR: uint32, + SUB_EPOCH_BLOCKS: uint32, + EPOCH_BLOCKS: uint32, + SIGNIFICANT_BITS: uint8, + DISCRIMINANT_SIZE_BITS: uint16, + NUMBER_ZERO_BITS_PLOT_FILTER: uint8, + MIN_PLOT_SIZE: uint8, + MAX_PLOT_SIZE: uint8, + SUB_SLOT_TIME_TARGET: uint16, + NUM_SP_INTERVALS_EXTRA: uint8, + MAX_FUTURE_TIME2: uint32, + NUMBER_OF_TIMESTAMPS: uint8, + GENESIS_CHALLENGE: bytes, + AGG_SIG_ME_ADDITIONAL_DATA: bytes, + AGG_SIG_PARENT_ADDITIONAL_DATA: bytes, + AGG_SIG_PUZZLE_ADDITIONAL_DATA: bytes, + AGG_SIG_AMOUNT_ADDITIONAL_DATA: bytes, + AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: bytes, + AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: bytes, + AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: bytes, + GENESIS_PRE_FARM_POOL_PUZZLE_HASH: bytes, + GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: bytes, + MAX_VDF_WITNESS_SIZE: uint8, + MEMPOOL_BLOCK_BUFFER: uint8, + MAX_COIN_AMOUNT: uint64, + MAX_BLOCK_COST_CLVM: uint64, + COST_PER_BYTE: uint64, + WEIGHT_PROOF_THRESHOLD: uint8, + WEIGHT_PROOF_RECENT_BLOCKS: uint32, + MAX_BLOCK_COUNT_PER_REQUESTS: uint32, + BLOCKS_CACHE_SIZE: uint32, + MAX_GENERATOR_SIZE: uint32, + MAX_GENERATOR_REF_LIST_SIZE: uint32, + POOL_SUB_SLOT_ITERS: uint64, + SOFT_FORK2_HEIGHT: uint32, + SOFT_FORK4_HEIGHT: uint32, + SOFT_FORK5_HEIGHT: uint32, + HARD_FORK_HEIGHT: uint32, + HARD_FORK_FIX_HEIGHT: uint32, + PLOT_FILTER_128_HEIGHT: uint32, + PLOT_FILTER_64_HEIGHT: uint32, + PLOT_FILTER_32_HEIGHT: uint32 + ) -> ConsensusConstants: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ...