import { FullBlock } from "../../chia_rs/chia-protocol/fullblock"; import { BlockRecord } from "../../chia_rs/chia-protocol/block_record"; import { bool, float, Optional, str } from "../../chia/types/_python_types_"; import { int, uint128, uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints"; import { UnfinishedHeaderBlock } from "../../chia/types/unfinished_header_block"; import { CoinRecord, CoinRecordBackwardCompatible } from "../../chia_rs/chia-protocol/coin_record"; import { SpendBundle } from "../../chia_rs/chia-protocol/spend_bundle"; import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes"; import { MempoolItemInJsonDict } from "../../chia/types/mempool_item"; import { TRPCAgent } from "../../../rpc"; import { EndOfSubSlotBundle } from "../../chia_rs/chia-protocol/end_of_sub_slot_bundle"; import { SignagePoint } from "../../chia/full_node/signage_point"; import { CoinSpend } from "../../chia_rs/chia-protocol/coin_spend"; import { CoinSpendWithConditions } from "../../chia/types/coin_spend"; import { CLVMCost } from "../../chia/types/clvm_cost"; import { Program } from "../../chia_rs/chia-protocol/program"; import { Coin } from "../../chia/types/blockchain_format/coin"; import { G2Element } from "../../chia_rs/chia-bls/lib"; import { GetMessageType, ResType } from "../../types"; import { TDaemon } from "../../../daemon/index"; export declare const chia_full_node_service = "chia_full_node"; export type chia_full_node_service = typeof chia_full_node_service; export declare const get_blockchain_state_command = "get_blockchain_state"; export type get_blockchain_state_command = typeof get_blockchain_state_command; export type TGetBlockchainStateResponse = { blockchain_state: { peak: Optional; genesis_challenge_initialized: bool; sync: { sync_mode: bool; synced: bool; sync_tip_height: uint32; sync_progress_height: uint32; }; difficulty: uint64; sub_slot_iters: uint64; space: uint128; average_block_time: Optional; mempool_size: int; mempool_cost: CLVMCost; mempool_fees: uint64; mempool_min_fees: { cost_5000000: float; }; mempool_max_total_cost: uint64; block_max_cost: uint64; node_id: str; }; }; export type WsGetBlockchainStateMessage = GetMessageType; export declare function get_blockchain_state(agent: T): Promise>; export declare const get_block_command = "get_block"; export type get_block_command = typeof get_block_command; export type TGetBlockRequest = { header_hash: str; }; export type TGetBlockResponse = { block: FullBlock; }; export type WsGetBlockMessage = GetMessageType; export declare function get_block(agent: T, data: TGetBlockRequest): Promise>; export declare const get_blocks_command = "get_blocks"; export type get_blocks_command = typeof get_blocks_command; export type TGetBlocksRequest = { start: int; end: int; exclude_header_hash?: bool; exclude_reorged?: bool; }; export type TGetBlocksResponse = { blocks: FullBlock[] | Array; }; export type WsGetBlocksMessage = GetMessageType; export declare function get_blocks(agent: T, data: TGetBlocksRequest): Promise>; export declare const get_block_count_metrics_command = "get_block_count_metrics"; export type get_block_count_metrics_command = typeof get_block_count_metrics_command; export type TGetBlockCountMetricsResponse = { metrics: { compact_blocks: int; uncompact_blocks: int; hint_count: int; }; }; export type WsGetBlockCountMetricsMessage = GetMessageType; export declare function get_block_count_metrics(agent: T): Promise>; export declare const get_block_record_by_height_command = "get_block_record_by_height"; export type get_block_record_by_height_command = typeof get_block_record_by_height_command; export type TGetBlockRecordByHeightRequest = { height: int; }; export type TGetBlockRecordByHeightResponse = { block_record: Optional; }; export type WsGetBlockRecordByHeightMessage = GetMessageType; export declare function get_block_record_by_height(agent: T, data: TGetBlockRecordByHeightRequest): Promise>; export declare const get_block_record_command = "get_block_record"; export type get_block_record_command = typeof get_block_record_command; export type TGetBlockRecordRequest = { header_hash: str; }; export type TGetBlockRecordResponse = { block_record: BlockRecord; }; export type WsGetBlockRecordMessage = GetMessageType; export declare function get_block_record(agent: T, data: TGetBlockRecordRequest): Promise>; export declare const create_block_generator_command = "create_block_generator"; export type create_block_generator_command = typeof create_block_generator_command; export type TCreateBlockGeneratorResponse = { generator: Program; refs: uint32[]; additions: Coin[]; removals: Coin[]; sig: G2Element; cost: uint64; }; export type WsCreateBlockGeneratorMessage = GetMessageType; export declare function create_block_generator(agent: T): Promise>; export declare const get_block_records_command = "get_block_records"; export type get_block_records_command = typeof get_block_records_command; export type TGetBlockRecordsRequest = { start: int; end: int; }; export type TGetBlockRecordsResponse = { block_records: BlockRecord[]; }; export type WsGetBlockRecordsMessage = GetMessageType; export declare function get_block_records(agent: T, data: TGetBlockRecordsRequest): Promise>; export declare const get_block_spends_command = "get_block_spends"; export type get_block_spends_command = typeof get_block_spends_command; export type TGetBlockSpendsRequest = { header_hash: str; }; export type TGetBlockSpendsResponse = { block_spends: CoinSpend[]; }; export type WsGetBlockSpendsMessage = GetMessageType; export declare function get_block_spends(agent: T, data: TGetBlockSpendsRequest): Promise>; export declare const get_block_spends_with_conditions_command = "get_block_spends_with_conditions"; export type get_block_spends_with_conditions_command = typeof get_block_spends_with_conditions_command; export type TGetBlockSpendsWithConditionsRequest = { header_hash: str; }; export type TGetBlockSpendsWithConditionsResponse = { block_spends_with_conditions: CoinSpendWithConditions[]; }; export type WsGetBlockSpendsWithConditionsMessage = GetMessageType; export declare function get_block_spends_with_conditions(agent: T, data: TGetBlockSpendsWithConditionsRequest): Promise>; export declare const get_unfinished_block_headers_command = "get_unfinished_block_headers"; export type get_unfinished_block_headers_command = typeof get_unfinished_block_headers_command; export type TGetUnfinishedBlockHeadersResponse = { headers: UnfinishedHeaderBlock[]; }; export type WsGetUnfinishedBlockHeadersMessage = GetMessageType; export declare function get_unfinished_block_headers(agent: T): Promise>; export declare const get_network_space_command = "get_network_space"; export type get_network_space_command = typeof get_network_space_command; export type TGetNetworkSpaceRequest = { newer_block_header_hash: str; older_block_header_hash: str; }; export type TGetNetworkSpaceResponse = { space: uint128; }; export type WsGetNetworkSpaceMessage = GetMessageType; export declare function get_network_space(agent: T, data: TGetNetworkSpaceRequest): Promise>; export declare const get_additions_and_removals_command = "get_additions_and_removals"; export type get_additions_and_removals_command = typeof get_additions_and_removals_command; export type TGetAdditionsAndRemovalsRequest = { header_hash: str; }; export type TGetAdditionsAndRemovalsResponse = { additions: CoinRecordBackwardCompatible[]; removals: CoinRecordBackwardCompatible[]; }; export type WsGetAdditionsAndRemovalsMessage = GetMessageType; export declare function get_additions_and_removals(agent: T, data: TGetAdditionsAndRemovalsRequest): Promise>; export declare const get_aggsig_additional_data_command = "get_aggsig_additional_data"; export type get_aggsig_additional_data_command = typeof get_aggsig_additional_data_command; export type TGetAggsigAdditionalDataResponse = { additional_data: str; }; export type WsGetAggsigAdditionalDataMessage = GetMessageType; export declare function get_aggsig_additional_data(agent: T): Promise>; export declare const get_initial_freeze_period_command_of_full_node = "get_initial_freeze_period"; export type get_initial_freeze_period_command_of_full_node = typeof get_initial_freeze_period_command_of_full_node; export type TGetInitialFreezePeriodResponseOfFullNode = { INITIAL_FREEZE_END_TIMESTAMP: uint64; }; export type WsGetInitialFreezePeriodMessageOfFullNode = GetMessageType; export declare function get_initial_freeze_period_of_full_node(agent: T): Promise>; export declare const get_recent_signage_point_or_eos_command = "get_recent_signage_point_or_eos"; export type get_recent_signage_point_or_eos_command = typeof get_recent_signage_point_or_eos_command; export type TGetRecentSignagePointOrEOSCommandRequest = { challenge_hash: str; } | { sp_hash: str; }; export type TGetRecentSignagePointOrEOSCommandResponse = { eos: EndOfSubSlotBundle; time_received: float; reverted: bool; } | { signage_point: SignagePoint; time_received: float; reverted: bool; }; export type WsGetRecentSignagePointOrEOSCommandMessage = GetMessageType; export declare function get_recent_signage_point_or_eos(agent: T, data: TGetRecentSignagePointOrEOSCommandRequest): Promise>; export declare const get_coin_records_by_puzzle_hash_command = "get_coin_records_by_puzzle_hash"; export type get_coin_records_by_puzzle_hash_command = typeof get_coin_records_by_puzzle_hash_command; export type TGetCoinRecordsByPuzzleHashRequest = { puzzle_hash: str; start_height?: uint32; end_height?: uint32; include_spent_coins?: bool; }; export type TGetCoinRecordsByPuzzleHashResponse = { coin_records: CoinRecordBackwardCompatible[]; }; export type WsGetCoinRecordsByPuzzleHashMessage = GetMessageType; export declare function get_coin_records_by_puzzle_hash(agent: T, data: TGetCoinRecordsByPuzzleHashRequest): Promise>; export declare const get_coin_records_by_puzzle_hashes_command = "get_coin_records_by_puzzle_hashes"; export type get_coin_records_by_puzzle_hashes_command = typeof get_coin_records_by_puzzle_hashes_command; export type TGetCoinRecordsByPuzzleHashesRequest = { puzzle_hashes: str[]; start_height?: uint32; end_height?: uint32; include_spent_coins?: bool; }; export type TGetCoinRecordsByPuzzleHashesResponse = { coin_records: CoinRecordBackwardCompatible[]; }; export type WsGetCoinRecordsByPuzzleHashesMessage = GetMessageType; export declare function get_coin_records_by_puzzle_hashes(agent: T, data: TGetCoinRecordsByPuzzleHashesRequest): Promise>; export declare const get_coin_record_by_name_command = "get_coin_record_by_name"; export type get_coin_record_by_name_command = typeof get_coin_record_by_name_command; export type TGetCoinRecordByNameRequest = { name: str; }; export type TGetCoinRecordByNameResponse = { coin_record: CoinRecordBackwardCompatible; }; export type WsGetCoinRecordByNameMessage = GetMessageType; export declare function get_coin_record_by_name(agent: T, data: TGetCoinRecordByNameRequest): Promise>; export declare const get_coin_records_by_names_command = "get_coin_records_by_names"; export type get_coin_records_by_names_command = typeof get_coin_records_by_names_command; export type TGetCoinRecordsByNamesRequest = { names: str[]; start_height?: uint32; end_height?: uint32; include_spent_coins?: bool; }; export type TGetCoinRecordsByNamesResponse = { coin_records: CoinRecordBackwardCompatible[]; }; export type WsGetCoinRecordsByNamesMessage = GetMessageType; export declare function get_coin_records_by_names(agent: T, data: TGetCoinRecordsByNamesRequest): Promise>; export declare const get_coin_records_by_parent_ids_command = "get_coin_records_by_parent_ids"; export type get_coin_records_by_parent_ids_command = typeof get_coin_records_by_parent_ids_command; export type TGetCoinRecordsByParentIdsRequest = { parent_ids: str[]; start_height?: uint32; end_height?: uint32; include_spent_coins?: bool; }; export type TGetCoinRecordsByParentIdsResponse = { coin_records: CoinRecordBackwardCompatible[]; }; export type WsGetCoinRecordsByParentIdsMessage = GetMessageType; export declare function get_coin_records_by_parent_ids(agent: T, data: TGetCoinRecordsByParentIdsRequest): Promise>; export declare const get_coin_records_by_hint_command = "get_coin_records_by_hint"; export type get_coin_records_by_hint_command = typeof get_coin_records_by_hint_command; export type TGetCoinRecordsByHintRequest = { hint: str; start_height?: uint32; end_height?: uint32; include_spent_coins?: bool; }; export type TGetCoinRecordsByHintResponse = { coin_records: CoinRecordBackwardCompatible[]; }; export type WsGetCoinRecordsByHintMessage = GetMessageType; export declare function get_coin_records_by_hint(agent: T, data: TGetCoinRecordsByHintRequest): Promise>; export declare const push_tx_command = "push_tx"; export type push_tx_command = typeof push_tx_command; export type TPushTxRequest = { spend_bundle: SpendBundle; }; export type TPushTxResponse = { status: str; }; export type WsPushTxMessage = GetMessageType; export declare function push_tx(agent: T, data: TPushTxRequest): Promise>; export declare const get_puzzle_and_solution_command = "get_puzzle_and_solution"; export type get_puzzle_and_solution_command = typeof get_puzzle_and_solution_command; export type TGetPuzzleAndSolutionRequest = { coin_id: str; height: uint32; }; export type TGetPuzzleAndSolutionResponse = { coin_solution: CoinSpend; }; export type WsGetPuzzleAndSolutionMessage = GetMessageType; export declare function get_puzzle_and_solution(agent: T, data: TGetPuzzleAndSolutionRequest): Promise>; export declare const get_all_mempool_tx_ids_command = "get_all_mempool_tx_ids"; export type get_all_mempool_tx_ids_command = typeof get_all_mempool_tx_ids_command; export type TGetAllMempoolTxIdsResponse = { tx_ids: bytes32[]; }; export type WsGetAllMempoolTxIdsMessage = GetMessageType; export declare function get_all_mempool_tx_ids(agent: T): Promise>; export declare const get_all_mempool_items_command = "get_all_mempool_items"; export type get_all_mempool_items_command = typeof get_all_mempool_items_command; export type TGetAllMempoolItemsResponse = { mempool_items: Record; }; export type WsGetAllMempoolItemsMessage = GetMessageType; export declare function get_all_mempool_items(agent: T): Promise>; export declare const get_mempool_item_by_tx_id_command = "get_mempool_item_by_tx_id"; export type get_mempool_item_by_tx_id_command = typeof get_mempool_item_by_tx_id_command; export type TGetMempoolItemByTxIdRequest = { tx_id: str; include_pending?: bool; }; export type TGetMempoolItemByTxIdResponse = { mempool_item: MempoolItemInJsonDict; }; export type WsGetMempoolItemByTxIdMessage = GetMessageType; export declare function get_mempool_item_by_tx_id(agent: T, data: TGetMempoolItemByTxIdRequest): Promise>; export declare const get_mempool_items_by_coin_name_command = "get_mempool_items_by_coin_name"; export type get_mempool_items_by_coin_name_command = typeof get_mempool_items_by_coin_name_command; export type TGetMempoolItemsByCoinNameRequest = { coin_name: str; }; export type TGetMempoolItemsByCoinNameResponse = { mempool_items: MempoolItemInJsonDict[]; }; export type WsGetMempoolItemsByCoinNameMessage = GetMessageType; export declare function get_mempool_items_by_coin_name(agent: T, data: TGetMempoolItemsByCoinNameRequest): Promise>; export declare const get_fee_estimate_command = "get_fee_estimate"; export type get_fee_estimate_command = typeof get_fee_estimate_command; export type TGetFeeEstimateRequest = { spend_bundle?: SpendBundle; cost?: uint64; spend_type?: "send_xch_transaction" | "cat_spend" | "take_offer" | "cancel_offer" | "nft_set_nft_did" | "nft_transfer_nft" | "create_new_pool_wallet" | "pw_absorb_rewards" | "create_new_did_wallet"; spend_count?: uint64; target_times: int[]; }; export type TGetFeeEstimateResponse = { estimates: uint64[]; target_times: int[]; current_fee_rate: uint64; mempool_size: CLVMCost; mempool_fees: uint64; num_spends: int; mempool_max_size: CLVMCost; full_node_synced: bool; peak_height: uint32; last_peak_timestamp: uint64; node_time_utc: uint64; last_block_cost: uint64; fees_last_block: uint64; fee_rate_last_block: float; last_tx_block_height: int; }; export type WsGetFeeEstimateMessage = GetMessageType; export declare function get_fee_estimate(agent: T, data: TGetFeeEstimateRequest): Promise>; export declare const get_all_blocks_command = "get_all_blocks"; export type get_all_blocks_command = typeof get_all_blocks_command; export type TGetAllBlocksResponse = { blocks: FullBlock[]; success: bool; }; export type WsGetAllBlocksMessage = GetMessageType; export declare function get_all_blocks(agent: T): Promise>; export declare const farm_block_command = "farm_block"; export type farm_block_command = typeof farm_block_command; export type TFarmBlockRequest = { address: str; guarantee_tx_block?: bool; blocks?: int; }; export type TFarmBlockResponse = { new_peak_height: int; success: bool; }; export type WsFarmBlockMessage = GetMessageType; export declare function farm_block(agent: T, data: TFarmBlockRequest): Promise>; export declare const set_auto_farming_command = "set_auto_farming"; export type set_auto_farming_command = typeof set_auto_farming_command; export type TSetAutoFarmingRequest = { auto_farm: bool; }; export type TSetAutoFarmingResponse = { auto_farm_enabled: bool; success: bool; }; export type WsSetAutoFarmingMessage = GetMessageType; export declare function set_auto_farming(agent: T, data: TSetAutoFarmingRequest): Promise>; export declare const get_auto_farming_command = "get_auto_farming"; export type get_auto_farming_command = typeof get_auto_farming_command; export type TGetAutoFarmingResponse = { auto_farm_enabled: bool; success: bool; }; export type WsGetAutoFarmingMessage = GetMessageType; export declare function get_auto_farming(agent: T): Promise>; export declare const get_farming_ph_command = "get_farming_ph"; export type get_farming_ph_command = typeof get_farming_ph_command; export type TGetFarmingPhResponse = { puzzle_hash: str; success: bool; }; export type WsGetFarmingPhMessage = GetMessageType; export declare function get_farming_ph(agent: T): Promise>; export declare const get_all_coins_command = "get_all_coins"; export type get_all_coins_command = typeof get_all_coins_command; export type TGetAllCoinsRequest = { include_spent_coins?: bool; }; export type TGetAllCoinsResponse = { coin_records: CoinRecord[]; success: bool; }; export type WsGetAllCoinsMessage = GetMessageType; export declare function get_all_coins(agent: T, data: TGetAllCoinsRequest): Promise>; export declare const get_all_puzzle_hashes_command = "get_all_puzzle_hashes"; export type get_all_puzzle_hashes_command = typeof get_all_puzzle_hashes_command; export type TGetAllPuzzleHashesResponse = { puzzle_hashes: Record; success: bool; }; export type WsGetAllPuzzleHashesMessage = GetMessageType; export declare function get_all_puzzle_hashes(agent: T): Promise>; export declare const revert_blocks_command = "revert_blocks"; export type revert_blocks_command = typeof revert_blocks_command; export type TRevertBlocksRequest = { num_of_blocks?: int; delete_all_blocks?: bool; }; export type TRevertBlocksResponse = { new_peak_height: int; success: bool; }; export type WsRevertBlocksMessage = GetMessageType; export declare function revert_blocks(agent: T, data: TRevertBlocksRequest): Promise>; export declare const reorg_blocks_command = "reorg_blocks"; export type reorg_blocks_command = typeof reorg_blocks_command; export type TReorgBlocksRequest = { num_of_blocks_to_rev?: int; num_of_new_blocks?: int; revert_all_blocks?: bool; random_seed?: str; }; export type TReorgBlocksResponse = { new_peak_height: int; success: bool; }; export type WsReorgBlocksMessage = GetMessageType; export declare function reorg_blocks(agent: T, data: TReorgBlocksRequest): Promise>; export type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAggsigAdditionalDataResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockSpendsResponse | TGetBlockSpendsWithConditionsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetMempoolItemsByCoinNameResponse | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse | TGetPuzzleAndSolutionResponse | TGetFeeEstimateResponse | TGetAllBlocksResponse | TFarmBlockResponse | TSetAutoFarmingResponse | TGetAutoFarmingResponse | TGetFarmingPhResponse | TGetAllCoinsResponse | TGetAllPuzzleHashesResponse | TRevertBlocksResponse | TReorgBlocksResponse; export type RpcFullNodeMessageOnWs = WsGetAdditionsAndRemovalsMessage | WsGetAggsigAdditionalDataMessage | WsGetAllMempoolItemsMessage | WsGetAllMempoolTxIdsMessage | WsGetBlockMessage | WsGetBlockRecordByHeightMessage | WsGetBlockRecordMessage | WsGetBlockRecordsMessage | WsGetBlockSpendsMessage | WsGetBlockSpendsWithConditionsMessage | WsGetBlockchainStateMessage | WsGetBlocksMessage | WsGetBlockCountMetricsMessage | WsGetRecentSignagePointOrEOSCommandMessage | WsGetCoinRecordByNameMessage | WsGetCoinRecordsByNamesMessage | WsGetCoinRecordsByPuzzleHashMessage | WsGetCoinRecordsByPuzzleHashesMessage | WsGetCoinRecordsByParentIdsMessage | WsGetCoinRecordsByHintMessage | WsGetInitialFreezePeriodMessageOfFullNode | WsGetMempoolItemByTxIdMessage | WsGetMempoolItemsByCoinNameMessage | WsGetNetworkSpaceMessage | WsGetUnfinishedBlockHeadersMessage | WsPushTxMessage | WsGetPuzzleAndSolutionMessage | WsGetFeeEstimateMessage | WsGetAllBlocksMessage | WsFarmBlockMessage | WsSetAutoFarmingMessage | WsGetAutoFarmingMessage | WsGetFarmingPhMessage | WsGetAllCoinsMessage | WsGetAllPuzzleHashesMessage | WsRevertBlocksMessage | WsReorgBlocksMessage;