import { TRPCAgent } from "../../../rpc/index"; import { bool, bytes, None, Optional, str } from "../../chia/types/_python_types_"; import { int, uint64 } from "../../chia_rs/wheel/python/sized_ints"; import { TransactionRecord } from "../../chia/wallet/transaction_record"; import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes"; import { DLProof, OfferMarshalled, OfferStoreMarshalled, PluginStatusMarshalled, RootMarshalled, SyncStatus, VerifyProofResponse } from "../../chia/data_layer/data_layer_util"; import { GetMessageType, ResType } from "../../types"; import { TDaemon } from "../../../daemon/index"; export declare const chia_data_layer_service = "chia_data_layer"; export type chia_data_layer_service = typeof chia_data_layer_service; export declare const wallet_log_in_command = "wallet_log_in"; export type wallet_log_in_command = typeof wallet_log_in_command; export type TWalletLogInRequest = { fingerprint: int; }; export type TWalletLogInResponse = Record; export type WsWalletLogInMessage = GetMessageType; export declare function wallet_log_in(agent: T, params: TWalletLogInRequest): Promise>; export declare const create_data_store_command = "create_data_store"; export type create_data_store_command = typeof create_data_store_command; export type TCreateDataStoreRequest = { fee?: uint64; verbose?: bool; }; export type TCreateDataStoreResponse = { txs?: TransactionRecord[]; id: str; }; export type WsCreateDataStoreMessage = GetMessageType; export declare function create_data_store(agent: T, params: TCreateDataStoreRequest): Promise>; export declare const get_owned_stores_command = "get_owned_stores"; export type get_owned_stores_command = typeof get_owned_stores_command; export type TGetOwnedStoresResponse = { store_ids: str[]; }; export type WsGetOwnedStoresMessage = GetMessageType; export declare function get_owned_stores(agent: T): Promise>; export type BatchUpdateChange = { action: "insert"; key: str; value: str; reference_node_hash?: str; side?: 0 | 1; } | { action: "delete"; key: str; } | { action: "upsert"; key: str; value: str; }; export declare const batch_update_command = "batch_update"; export type batch_update_command = typeof batch_update_command; export type TBatchUpdateRequest = { fee?: uint64; changelist: BatchUpdateChange[]; id: str; submit_on_chain?: bool; }; export type TBatchUpdateResponse = { tx_id?: bytes32; }; export type WsBatchUpdateMessage = GetMessageType; export declare function batch_update(agent: T, params: TBatchUpdateRequest): Promise>; export declare const multistore_batch_update_command = "multistore_batch_update"; export type multistore_batch_update_command = typeof multistore_batch_update_command; export type TMultistoreBatchUpdateRequest = { fee?: uint64; store_updates: Array<{ store_id: str; changelist: BatchUpdateChange[]; }>; submit_on_chain?: bool; }; export type TMultistoreBatchUpdateResponse = { tx_id?: bytes32[]; }; export type WsMultistoreBatchUpdateMessage = GetMessageType; export declare function multistore_batch_update(agent: T, params: TMultistoreBatchUpdateRequest): Promise>; export declare const submit_pending_root_command = "submit_pending_root"; export type submit_pending_root_command = typeof submit_pending_root_command; export type TSubmitPendingRootRequest = { id: str; fee?: uint64; }; export type TSubmitPendingRootResponse = { tx_id: bytes32; }; export type WsSubmitPendingRootMessage = GetMessageType; export declare function submit_pending_root(agent: T, params: TSubmitPendingRootRequest): Promise>; export declare const submit_all_pending_roots_command = "submit_all_pending_roots"; export type submit_all_pending_roots_command = typeof submit_all_pending_roots_command; export type TSubmitAllPendingRootsRequest = { fee?: uint64; }; export type TSubmitAllPendingRootsResponse = { tx_id: bytes32[]; }; export type WsSubmitAllPendingRootsMessage = GetMessageType; export declare function submit_all_pending_roots(agent: T, params: TSubmitAllPendingRootsRequest): Promise>; export declare const get_value_command = "get_value"; export type get_value_command = typeof get_value_command; export type TGetValueRequest = { id: str; key: str; root_hash?: str; }; export type TGetValueResponse = { value: str | None; }; export type WsGetValueMessage = GetMessageType; export declare function get_value(agent: T, params: TGetValueRequest): Promise>; export declare const get_keys_command = "get_keys"; export type get_keys_command = typeof get_keys_command; export type TGetKeysRequest = { id: str; root_hash?: str; page?: int; max_page_size?: int; }; export type TGetKeysResponse = { keys: str[]; } | { keys: str[]; total_pages: int; total_bytes: uint64; root_hash: Optional; }; export type WsGetKeysMessage = GetMessageType; export declare function get_keys(agent: T, params: TGetKeysRequest): Promise>; export declare const get_keys_values_command = "get_keys_values"; export type get_keys_values_command = typeof get_keys_values_command; export type TGetKeysValuesRequest = { id: str; root_hash?: str; page?: int; max_page_size?: int; }; export type TGetKeysValuesResponse = { keys_values: Array<{ hash: str; key: str; value: str; }>; } | { keys_values: Array<{ hash: str; key: str; value: str; }>; total_pages: int; total_bytes: uint64; root_hash: Optional; }; export type WsGetKeysValuesMessage = GetMessageType; export declare function get_keys_values(agent: T, params: TGetKeysValuesRequest): Promise>; export declare const get_ancestors_command = "get_ancestors"; export type get_ancestors_command = typeof get_ancestors_command; export type TGetAncestorsRequest = { id: str; hash: str; }; export type TGetAncestorsResponse = { ancestors: Array<{ hash: bytes32; left_hash: bytes32; right_hash: bytes32; }>; }; export type WsGetAncestorsMessage = GetMessageType; export declare function get_ancestors(agent: T, params: TGetAncestorsRequest): Promise>; export declare const get_root_command = "get_root"; export type get_root_command = typeof get_root_command; export type TGetRootRequest = { id: str; }; export type TGetRootResponse = { hash: bytes32; confirmed: bool; timestamp: uint64; }; export type WsGetRootMessage = GetMessageType; export declare function get_root(agent: T, params: TGetRootRequest): Promise>; export declare const get_local_root_command = "get_local_root"; export type get_local_root_command = typeof get_local_root_command; export type TGetLocalRootRequest = { id: str; }; export type TGetLocalRootResponse = { hash: bytes32 | None; }; export type WsGetLocalRootMessage = GetMessageType; export declare function get_local_root(agent: T, params: TGetLocalRootRequest): Promise>; export declare const get_roots_command = "get_roots"; export type get_roots_command = typeof get_roots_command; export type TGetRootsRequest = { ids: str[]; }; export type TGetRootsResponse = { root_hashes: Array<{ id: bytes32; hash: bytes32; confirmed: bool; timestamp: uint64; }>; }; export type WsGetRootsMessage = GetMessageType; export declare function get_roots(agent: T, params: TGetRootsRequest): Promise>; export declare const delete_key_command = "delete_key"; export type delete_key_command = typeof delete_key_command; export type TDeleteKeyRequest = { fee?: uint64; key: str; id: str; }; export type TDeleteKeyResponse = { tx_id: bytes32; }; export type WsDeleteKeyMessage = GetMessageType; export declare function delete_key(agent: T, params: TDeleteKeyRequest): Promise>; export declare const insert_command = "insert"; export type insert_command = typeof insert_command; export type TInsertRequest = { fee?: uint64; key: str; value: str; id: str; }; export type TInsertResponse = { tx_id: bytes32; }; export type WsInsertMessage = GetMessageType; export declare function insert(agent: T, params: TInsertRequest): Promise>; export declare const subscribe_command = "subscribe"; export type subscribe_command = typeof subscribe_command; export type TSubscribeRequest = { id: str; urls: str[]; }; export type TSubscribeResponse = Record; export type WsSubscribeMessage = GetMessageType; export declare function subscribe(agent: T, params: TSubscribeRequest): Promise>; export declare const unsubscribe_command = "unsubscribe"; export type unsubscribe_command = typeof unsubscribe_command; export type TUnsubscribeRequest = { id: str; retain?: bool; }; export type TUnsubscribeResponse = Record; export type WsUnsubscribeMessage = GetMessageType; export declare function unsubscribe(agent: T, params: TUnsubscribeRequest): Promise>; export declare const add_mirror_command = "add_mirror"; export type add_mirror_command = typeof add_mirror_command; export type TAddMirrorRequest = { id: str; urls: str[]; amount: uint64; fee?: uint64; }; export type TAddMirrorResponse = Record; export type WsAddMirrorMessage = GetMessageType; export declare function add_mirror(agent: T, params: TAddMirrorRequest): Promise>; export declare const delete_mirror_command = "delete_mirror"; export type delete_mirror_command = typeof delete_mirror_command; export type TDeleteMirrorRequest = { coin_id: str; fee?: uint64; }; export type TDeleteMirrorResponse = Record; export type WsDeleteMirrorMessage = GetMessageType; export declare function delete_mirror(agent: T, params: TDeleteMirrorRequest): Promise>; export declare const get_mirrors_command = "get_mirrors"; export type get_mirrors_command = typeof get_mirrors_command; export type TGetMirrorsRequest = { id: str; }; export type TGetMirrorsResponse = { mirrors: Array<{ coin_id: str; launcher_id: str; amount: uint64; urls: str[]; ours: bool; }>; }; export type WsGetMirrorsMessage = GetMessageType; export declare function get_mirrors(agent: T, params: TGetMirrorsRequest): Promise>; export declare const remove_subscriptions_command = "remove_subscriptions"; export type remove_subscriptions_command = typeof remove_subscriptions_command; export type TRemoveSubscriptionsRequest = { id: str; urls: str[]; }; export type TRemoveSubscriptionsResponse = Record; export type WsRemoveSubscriptionsMessage = GetMessageType; export declare function remove_subscriptions(agent: T, params: TRemoveSubscriptionsRequest): Promise>; export declare const subscriptions_command = "subscriptions"; export type subscriptions_command = typeof subscriptions_command; export type TSubscriptionsResponse = { store_ids: str[]; }; export type WsSubscriptionsMessage = GetMessageType; export declare function subscriptions(agent: T): Promise>; export declare const get_kv_diff_command = "get_kv_diff"; export type get_kv_diff_command = typeof get_kv_diff_command; export type TGetKvDiffRequest = { id: str; hash_1: str; hash_2: str; page?: int; max_page_size?: int; }; export type TGetKvDiffResponse = { diff: Array<{ type: str; key: str; value: str; }>; } | { diff: Array<{ type: str; key: str; value: str; }>; total_pages: int; total_bytes: uint64; }; export type WsGetKvDiffMessage = GetMessageType; export declare function get_kv_diff(agent: T, params: TGetKvDiffRequest): Promise>; export declare const get_root_history_command = "get_root_history"; export type get_root_history_command = typeof get_root_history_command; export type TGetRootHistoryRequest = { id: str; }; export type TGetRootHistoryResponse = { root_history: Array<{ root_hash: bytes32; confirmed: bool; timestamp: uint64; }>; }; export type WsGetRootHistoryMessage = GetMessageType; export declare function get_root_history(agent: T, params: TGetRootHistoryRequest): Promise>; export declare const add_missing_files_command = "add_missing_files"; export type add_missing_files_command = typeof add_missing_files_command; export type TAddMissingFilesRequest = { ids?: str[]; overwrite?: bool; foldername?: str; }; export type TAddMissingFilesResponse = Record; export type WsAddMissingFilesMessage = GetMessageType; export declare function add_missing_files(agent: T, params: TAddMissingFilesRequest): Promise>; export declare const make_offer_command = "make_offer"; export type make_offer_command = typeof make_offer_command; export type TMakeOfferRequest = { fee?: uint64; maker: OfferStoreMarshalled; taker: OfferStoreMarshalled; }; export type TMakeOfferResponse = { success: bool; offer: OfferMarshalled; }; export type WsMakeOfferMessage = GetMessageType; export declare function make_offer(agent: T, params: TMakeOfferRequest): Promise>; export declare const take_offer_command = "take_offer"; export type take_offer_command = typeof take_offer_command; export type TTakeOfferRequest = { fee?: uint64; offer: OfferMarshalled; }; export type TTakeOfferResponse = { success: bool; trade_id: str; }; export type WsTakeOfferMessage = GetMessageType; export declare function take_offer(agent: T, params: TTakeOfferRequest): Promise>; export declare const verify_offer_command = "verify_offer"; export type verify_offer_command = typeof verify_offer_command; export type TVerifyOfferRequest = { fee?: uint64; offer: OfferMarshalled; }; export type TVerifyOfferResponse = { success: bool; valid: bool; error: Optional; fee: Optional; }; export type WsVerifyOfferMessage = GetMessageType; export declare function verify_offer(agent: T, params: TVerifyOfferRequest): Promise>; export declare const cancel_offer_command = "cancel_offer"; export type cancel_offer_command = typeof cancel_offer_command; export type TCancelOfferRequest = { trade_id: str; secure: bool; fee?: uint64; }; export type TCancelOfferResponse = { success: bool; }; export type WsCancelOfferMessage = GetMessageType; export declare function cancel_offer(agent: T, params: TCancelOfferRequest): Promise>; export declare const get_sync_status_command = "get_sync_status"; export type get_sync_status_command = typeof get_sync_status_command; export type TGetSyncStatusRequest = { id: str; }; export type TGetSyncStatusResponse = { sync_status: SyncStatus; }; export type WsGetSyncStatusMessage = GetMessageType; export declare function get_sync_status(agent: T, params: TGetSyncStatusRequest): Promise>; export declare const check_plugins_command = "check_plugins"; export type check_plugins_command = typeof check_plugins_command; export type TCheckPluginsResponse = PluginStatusMarshalled; export type WsCheckPluginsMessage = GetMessageType; export declare function check_plugins(agent: T): Promise>; export declare const clear_pending_roots_command = "clear_pending_roots"; export type clear_pending_roots_command = typeof clear_pending_roots_command; export type TClearPendingRootsRequest = { store_id: str; }; export type TClearPendingRootsResponse = { success: bool; root: Optional; }; export type WsClearPendingRootsMessage = GetMessageType; export declare function clear_pending_roots(agent: T, params: TClearPendingRootsRequest): Promise>; export declare const get_proof_command = "get_proof"; export type get_proof_command = typeof get_proof_command; export type TGetProofRequest = { store_id: bytes32; keys: bytes[]; }; export type TGetProofResponse = { proof: DLProof; success: bool; }; export type WsGetProofMessage = GetMessageType; export declare function get_proof(agent: T, params: TGetProofRequest): Promise>; export declare const verify_proof_command = "verify_proof"; export type verify_proof_command = typeof verify_proof_command; export type TVerifyProofRequest = DLProof; export type TVerifyProofResponse = VerifyProofResponse; export type WsVerifyProofMessage = GetMessageType; export declare function verify_proof(agent: T, params: TVerifyProofRequest): Promise>; export type RpcDataLayerMessage = TWalletLogInResponse | TCreateDataStoreResponse | TGetOwnedStoresResponse | TBatchUpdateResponse | TMultistoreBatchUpdateResponse | TSubmitPendingRootResponse | TSubmitAllPendingRootsRequest | TGetValueResponse | TGetKeysResponse | TGetKeysValuesResponse | TGetAncestorsResponse | TGetRootResponse | TGetLocalRootResponse | TGetRootsResponse | TDeleteKeyResponse | TInsertResponse | TSubscribeResponse | TUnsubscribeResponse | TAddMirrorResponse | TDeleteMirrorResponse | TGetMirrorsResponse | TRemoveSubscriptionsResponse | TSubscriptionsResponse | TGetKvDiffResponse | TGetRootHistoryResponse | TAddMissingFilesResponse | TMakeOfferResponse | TTakeOfferResponse | TVerifyOfferResponse | TCancelOfferResponse | TGetSyncStatusResponse | TCheckPluginsResponse | TClearPendingRootsResponse | TGetProofResponse | TVerifyProofResponse; export type RpcDataLayerMessageOnWs = WsWalletLogInMessage | WsCreateDataStoreMessage | WsGetOwnedStoresMessage | WsBatchUpdateMessage | WsMultistoreBatchUpdateMessage | WsSubmitPendingRootMessage | WsSubmitAllPendingRootsMessage | WsGetValueMessage | WsGetKeysMessage | WsGetKeysValuesMessage | WsGetAncestorsMessage | WsGetRootMessage | WsGetLocalRootMessage | WsGetRootsMessage | WsDeleteKeyMessage | WsInsertMessage | WsSubscribeMessage | WsUnsubscribeMessage | WsAddMirrorMessage | WsDeleteMirrorMessage | WsGetMirrorsMessage | WsRemoveSubscriptionsMessage | WsSubscriptionsMessage | WsGetKvDiffMessage | WsGetRootHistoryMessage | WsAddMissingFilesMessage | WsMakeOfferMessage | WsTakeOfferMessage | WsVerifyOfferMessage | WsCancelOfferMessage | WsGetSyncStatusMessage | WsCheckPluginsMessage | WsClearPendingRootsMessage | WsGetProofMessage | WsVerifyProofMessage;