chia-agent
Version:
chia rpc/websocket client library
824 lines • 103 kB
TypeScript
import { WalletInfo } from "../../chia/wallet/wallet_info";
import { Coin } from "../../chia/types/blockchain_format/coin";
import { bool, bytes, False, None, Optional, str, True } from "../../chia/types/_python_types_";
import { int, uint16, uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
import { TransactionRecord, TransactionRecordConvenience, TransactionRecordConvenienceWithMetadata } from "../../chia/wallet/transaction_record";
import { SpendBundle } from "../../chia_rs/chia-protocol/spend_bundle";
import { TRPCAgent } from "../../../rpc";
import { PoolWalletInfo } from "../../chia/pools/pool_wallet_info";
import { TradeRecordConvenience } from "../../chia/wallet/trade_record";
import { CAT } from "../../chia/wallet/cat_wallet/cat_constants";
import { TDriverDict } from "../../chia/wallet/puzzle_drivers";
import { NFTInfo } from "../../chia/wallet/nft_wallet/nft_info";
import { Mirror } from "../../chia/data_layer/data_layer_wallet";
import { SingletonRecord } from "../../chia/data_layer/singleton_record";
import { TPushTxResponseOfWallet } from "../index";
import { GetMessageType, ResType } from "../../types";
import { TDaemon } from "../../../daemon/index";
import { CoinRecord } from "../../chia/types/coin_record";
import { SigningMode } from "../../chia/types/signing_mode";
import { Balance } from "../../chia/wallet/wallet_node";
import { AutoClaimSettings, AutoClaimSettingsCHIP0029 } from "../../chia/wallet/puzzles/clawback/metadata";
import { GetCoinRecords } from "../../chia/wallet/wallet_coin_store";
import { WalletCoinRecordWithMetadata } from "../../chia/wallet/wallet_coin_record";
import { TransactionTypeFilter } from "../../chia/wallet/util/quality_filter";
import { TXConfigLoader } from "../../chia/wallet/util/tx_config";
import { ConditionValidTimes } from "../../chia/wallet/conditions";
import { DLProof, VerifyProofResponse } from "../../chia/data_layer/data_layer_util";
import { AddKeyRequest, AddKeyResponse, ApplySignatures, ApplySignaturesCHIP0029, ApplySignaturesResponse, ApplySignaturesResponseCHIP0029, CheckDeleteKeyRequest, CheckDeleteKeyResponse, CombineCoins, CombineCoinsCHIP0029, CombineCoinsResponse, CombineCoinsResponseCHIP0029, DeleteKeyRequest, ExecuteSigningInstructions, ExecuteSigningInstructionsCHIP0029, ExecuteSigningInstructionsResponse, ExecuteSigningInstructionsResponseCHIP0029, GatherSigningInfo, GatherSigningInfoCHIP0029, GatherSigningInfoResponse, GatherSigningInfoResponseCHIP0029, GenerateMnemonicResponse, GetHeightInfo, GetHeightInfoResponse, GetLoggedInFingerprintResponse, GetNotifications, GetNotificationsResponse, GetPrivateKeyRequest, GetPrivateKeyResponse, GetPublicKeysResponse, GetSyncStatus, GetSyncStatusResponse, GetTimestampForHeightRequest, GetTimestampForHeightRequestCHIP0029, GetTimestampForHeightResponse, LogIn, LogInResponse, PushTransactions, PushTransactionsCHIP0029, PushTransactionsResponse, PushTransactionsResponseCHIP0029, PushTX, PushTXCHIP0029, SetWalletResyncOnStartup, SetWalletResyncOnStartupCHIP0029, SplitCoins, SplitCoinsCHIP0029, SplitCoinsResponse, SplitCoinsResponseCHIP0029, SubmitTransactions, SubmitTransactionsCHIP0029, SubmitTransactionsResponse, SubmitTransactionsResponseCHIP0029, VcAddProofs, VcAddProofsCHIP0029, VCGet, VCGetCHIP0029, VcGetList, VcGetListCHIP0029, VcGetListResponse, VCGetProofsForRoot, VCGetProofsForRootCHIP0029, VCGetProofsForRootResponse, VcGetResponse, VCMint, VCMintCHIP0029, VcMintResponse, VcMintResponseCHIP0029, VcRevoke, VcRevokeCHIP0029, VcRevokeResponse, VcRevokeResponseCHIP0029, VcSpend, VcSpendCHIP0029, VcSpendResponse, VcSpendResponseCHIP0029 } from "../../chia/rpc/wallet_request_types";
import { SigningResponse, UnsignedTransaction } from "../../chia/wallet/signer_protocol";
import { WalletSpendBundle } from "../../chia/wallet/wallet_spend_bundle";
import { TXEndpointRequest, TxeResp } from "../../chia/rpc/wallet_rpc_api";
import { Marshall, MaybeMarshall } from "../../chia/rpc/util";
export declare const chia_wallet_service = "chia_wallet";
export type chia_wallet_service = typeof chia_wallet_service;
export declare const log_in_command = "log_in";
export type log_in_command = typeof log_in_command;
export type TLoginRequest = LogIn;
export type TLoginResponse = LogInResponse;
export type WsLoginMessage = GetMessageType<chia_wallet_service, log_in_command, TLoginResponse>;
export declare function log_in<T extends TRPCAgent | TDaemon>(agent: T, data: TLoginRequest): Promise<ResType<T, LogInResponse, WsLoginMessage>>;
export declare const get_logged_in_fingerprint_command = "get_logged_in_fingerprint";
export type get_logged_in_fingerprint_command = typeof get_logged_in_fingerprint_command;
export type TGetLoggedInFingerprintResponse = GetLoggedInFingerprintResponse;
export type WsGetLoggedInFingerprintMessage = GetMessageType<chia_wallet_service, get_logged_in_fingerprint_command, TGetLoggedInFingerprintResponse>;
export declare function get_logged_in_fingerprint<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, GetLoggedInFingerprintResponse, WsGetLoggedInFingerprintMessage>>;
export declare const get_public_keys_command = "get_public_keys";
export type get_public_keys_command = typeof get_public_keys_command;
export type TGetPublicKeysResponse = GetPublicKeysResponse;
export type WsGetPublicKeysMessage = GetMessageType<chia_wallet_service, get_public_keys_command, TGetPublicKeysResponse>;
export declare function get_public_keys<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, GetPublicKeysResponse, WsGetPublicKeysMessage>>;
export declare const get_private_key_command = "get_private_key";
export type get_private_key_command = typeof get_private_key_command;
export type TGetPrivateKeyRequest = GetPrivateKeyRequest;
export type TGetPrivateKeyResponse = GetPrivateKeyResponse;
export type WsGetPrivateKeyMessage = GetMessageType<chia_wallet_service, get_private_key_command, TGetPrivateKeyResponse>;
export declare function get_private_key<T extends TRPCAgent | TDaemon>(agent: T, data: TGetPrivateKeyRequest): Promise<ResType<T, GetPrivateKeyResponse, WsGetPrivateKeyMessage>>;
export declare const generate_mnemonic_command = "generate_mnemonic";
export type generate_mnemonic_command = typeof generate_mnemonic_command;
export type TGenerateMnemonicResponse = GenerateMnemonicResponse;
export type WsGenerateMnemonicMessage = GetMessageType<chia_wallet_service, generate_mnemonic_command, TGenerateMnemonicResponse>;
export declare function generate_mnemonic<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, GenerateMnemonicResponse, WsGenerateMnemonicMessage>>;
export declare const add_key_command = "add_key";
export type add_key_command = typeof add_key_command;
export type TAddKeyRequest = AddKeyRequest;
export type TAddKeyResponse = AddKeyResponse;
export type WsAddKeyMessage = GetMessageType<chia_wallet_service, add_key_command, TAddKeyResponse>;
export declare function add_key<T extends TRPCAgent | TDaemon>(agent: T, data: TAddKeyRequest): Promise<ResType<T, AddKeyResponse, WsAddKeyMessage>>;
export declare const delete_key_command = "delete_key";
export type delete_key_command = typeof delete_key_command;
export type TDeleteKeyRequest = DeleteKeyRequest;
export type TDeleteKeyResponse = Record<string, never>;
export type WsDeleteKeyMessage = GetMessageType<chia_wallet_service, delete_key_command, TDeleteKeyResponse>;
export declare function delete_key<T extends TRPCAgent | TDaemon>(agent: T, data: TDeleteKeyRequest): Promise<ResType<T, TDeleteKeyResponse, WsDeleteKeyMessage>>;
export declare const check_delete_key_command = "check_delete_key";
export type check_delete_key_command = typeof check_delete_key_command;
export type TCheckDeleteKeyRequest = CheckDeleteKeyRequest;
export type TCheckDeleteKeyResponse = CheckDeleteKeyResponse;
export type WsCheckDeleteKeyMessage = GetMessageType<chia_wallet_service, check_delete_key_command, TCheckDeleteKeyResponse>;
export declare function check_delete_key<T extends TRPCAgent | TDaemon>(agent: T, data: TCheckDeleteKeyRequest): Promise<ResType<T, CheckDeleteKeyResponse, WsCheckDeleteKeyMessage>>;
export declare const delete_all_keys_command = "delete_all_keys";
export type delete_all_keys_command = typeof delete_all_keys_command;
export type TDeleteAllKeysResponse = Record<string, never>;
export type WsDeleteAllKeysMessage = GetMessageType<chia_wallet_service, delete_all_keys_command, TDeleteAllKeysResponse>;
export declare function delete_all_keys<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TDeleteAllKeysResponse, WsDeleteAllKeysMessage>>;
export declare const set_wallet_resync_on_startup_command = "set_wallet_resync_on_startup";
export type set_wallet_resync_on_startup_command = typeof set_wallet_resync_on_startup_command;
export type TSetWalletResyncOnStartupRequest = SetWalletResyncOnStartup | SetWalletResyncOnStartupCHIP0029;
export type TSetWalletResyncOnStartupResponse = {
success: True;
};
export type WsSetWalletResyncOnStartupMessage = GetMessageType<chia_wallet_service, set_wallet_resync_on_startup_command, TSetWalletResyncOnStartupResponse>;
export declare function set_wallet_resync_on_startup<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TSetWalletResyncOnStartupResponse, WsSetWalletResyncOnStartupMessage>>;
export declare const get_sync_status_command = "get_sync_status";
export type get_sync_status_command = typeof get_sync_status_command;
export type TGetSyncStatus = GetSyncStatus;
export type TGetSyncStatusResponse = GetSyncStatusResponse;
export type WsGetSyncStatusMessage<R> = GetMessageType<chia_wallet_service, get_sync_status_command, R>;
export declare function get_sync_status<T extends TRPCAgent | TDaemon, D extends TGetSyncStatus | undefined = undefined>(agent: T, data?: D): Promise<ResType<T, GetSyncStatusResponse, WsGetSyncStatusMessage<GetSyncStatusResponse>>>;
export declare const get_height_info_command = "get_height_info";
export type get_height_info_command = typeof get_height_info_command;
export type TGetHeightInfoRequest = GetHeightInfo;
export type TGetHeightInfoResponse = GetHeightInfoResponse;
export type WsGetHeightInfoMessage<R> = GetMessageType<chia_wallet_service, get_height_info_command, R>;
export declare function get_height_info<T extends TRPCAgent | TDaemon, D extends TGetHeightInfoRequest | undefined = undefined>(agent: T, data?: D): Promise<ResType<T, GetHeightInfoResponse, WsGetHeightInfoMessage<GetHeightInfoResponse>>>;
export declare const push_tx_command = "push_tx";
export type push_tx_command = typeof push_tx_command;
export type TPushTxRequest = PushTX | PushTXCHIP0029;
export type TPushTxResponse = Record<string, never>;
export type WsPushTxMessageOfWallet = GetMessageType<chia_wallet_service, push_tx_command, TPushTxResponse>;
export declare function push_tx<T extends TRPCAgent | TDaemon>(agent: T, data: TPushTxRequest): Promise<ResType<T, TPushTxResponseOfWallet, WsPushTxMessageOfWallet>>;
export declare const push_transactions_command = "push_transactions";
export type push_transactions_command = typeof push_transactions_command;
export type TPushTransactionsRequest = PushTransactions | PushTransactionsCHIP0029;
export type TPushTransactionsResponse = PushTransactionsResponse | PushTransactionsResponseCHIP0029;
export type WsPushTransactionsMessage<R> = GetMessageType<chia_wallet_service, push_transactions_command, R>;
export declare function push_transactions<T extends TRPCAgent | TDaemon, D extends PushTransactions | PushTransactionsCHIP0029>(agent: T, data: D): Promise<ResType<T, MaybeMarshall<D, import("../../chia/rpc/wallet_request_types").TransactionEndpointResponse, import("../../chia/rpc/wallet_request_types").TransactionEndpointResponseCHIP0029>, WsPushTransactionsMessage<MaybeMarshall<D, import("../../chia/rpc/wallet_request_types").TransactionEndpointResponse, import("../../chia/rpc/wallet_request_types").TransactionEndpointResponseCHIP0029>>>>;
export declare const get_timestamp_for_height_command = "get_timestamp_for_height";
export type get_timestamp_for_height_command = typeof get_timestamp_for_height_command;
export type TGetTimestampForHeightRequest = GetTimestampForHeightRequest | GetTimestampForHeightRequestCHIP0029;
export type TGetTimestampForHeightResponse = GetTimestampForHeightResponse;
export type WsGetTimestampForHeightMessage<R> = GetMessageType<chia_wallet_service, get_timestamp_for_height_command, R>;
export declare function get_timestamp_for_height<T extends TRPCAgent | TDaemon, D extends TGetTimestampForHeightRequest>(agent: T, params: D): Promise<ResType<T, GetTimestampForHeightResponse, WsGetTimestampForHeightMessage<GetTimestampForHeightResponse>>>;
export declare const set_auto_claim_command = "set_auto_claim";
export type set_auto_claim_command = typeof set_auto_claim_command;
export type TSetAutoClaimRequest = AutoClaimSettings | (AutoClaimSettingsCHIP0029 & Marshall);
export type TSetAutoClaimResponse = AutoClaimSettings | AutoClaimSettingsCHIP0029;
export type WsSetAutoClaimMessage<R> = GetMessageType<chia_wallet_service, set_auto_claim_command, R>;
export declare function set_auto_claim<T extends TRPCAgent | TDaemon, D extends TSetAutoClaimRequest>(agent: T, data: D): Promise<ResType<T, MaybeMarshall<D, AutoClaimSettings, AutoClaimSettingsCHIP0029>, WsSetAutoClaimMessage<MaybeMarshall<D, AutoClaimSettings, AutoClaimSettingsCHIP0029>>>>;
export declare const get_auto_claim_command = "get_auto_claim";
export type get_auto_claim_command = typeof get_auto_claim_command;
export type TGetAutoClaimRequest = Marshall;
export type TGetAutoClaimResponse = AutoClaimSettings | AutoClaimSettingsCHIP0029;
export type WsGetAutoClaimMessage<R> = GetMessageType<chia_wallet_service, get_auto_claim_command, R>;
export declare function get_auto_claim<T extends TRPCAgent | TDaemon, D extends TGetAutoClaimRequest | undefined = undefined>(agent: T, params?: D): Promise<ResType<T, MaybeMarshall<D, AutoClaimSettings, AutoClaimSettingsCHIP0029>, WsGetAutoClaimMessage<MaybeMarshall<D, AutoClaimSettings, AutoClaimSettingsCHIP0029>>>>;
export declare const get_initial_freeze_period_command_of_wallet = "get_initial_freeze_period";
export type get_initial_freeze_period_command_of_wallet = typeof get_initial_freeze_period_command_of_wallet;
export type TGetInitialFreezePeriodResponseOfWallet = {
INITIAL_FREEZE_END_TIMESTAMP: 1620061200;
};
export type WsGetInitialFreezePeriodMessageOfWallet = GetMessageType<chia_wallet_service, get_initial_freeze_period_command_of_wallet, TGetInitialFreezePeriodResponseOfWallet>;
export declare function get_initial_freeze_period_of_wallet<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetInitialFreezePeriodResponseOfWallet, WsGetInitialFreezePeriodMessageOfWallet>>;
export declare const get_wallets_command = "get_wallets";
export type get_wallets_command = typeof get_wallets_command;
export type TGetWalletsRequest = {
type?: int;
include_data?: bool;
};
export type TGetWalletsResponse = {
wallets: WalletInfo[];
fingerprint?: int;
};
export type WsGetWalletsMessage = GetMessageType<chia_wallet_service, get_wallets_command, TGetWalletsResponse>;
export declare function get_wallets<T extends TRPCAgent | TDaemon>(agent: T, data: TGetWalletsRequest): Promise<ResType<T, TGetWalletsResponse, WsGetWalletsMessage>>;
export type TCreate_New_CAT_WalletRequest = {
fee?: uint64;
wallet_type: "cat_wallet";
name?: str;
mode: "new";
test?: bool;
amount: uint64;
} | {
fee?: uint64;
wallet_type: "cat_wallet";
mode: "existing";
asset_id: str;
};
export type TCreate_New_CAT_WalletResponse = {
type: uint8;
asset_id: str;
wallet_id: uint32;
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
};
export type TCreateNewDidWalletRequestNew = {
fee?: uint64;
wallet_type: "did_wallet";
did_type: "new";
backup_dids: str[];
num_of_backup_ids_needed: uint64;
amount: int;
metadata?: Record<str, str>;
wallet_name?: str;
};
export type TCreateNewDidWalletRequestRecovery = {
fee?: uint64;
wallet_type: "did_wallet";
did_type: "recovery";
backup_data: str;
};
export type TCreate_New_DID_WalletRequest = TCreateNewDidWalletRequestNew | TCreateNewDidWalletRequestRecovery;
export type TCreateNewDidWalletResponseNew = {
success: True;
type: uint8;
my_did: str;
wallet_id: uint32;
};
export type TCreateNewDidWalletResponseRecovery = {
success: True;
type: uint8;
my_did: str;
wallet_id: uint32;
coin_name: str;
coin_list: [bytes32, bytes32, uint64];
newpuzhash: str;
pubkey: str;
backup_dids: bytes[];
num_verifications_required: uint64;
};
export type TCreate_New_DID_WalletResponse = TCreateNewDidWalletResponseNew | TCreateNewDidWalletResponseRecovery;
export type TCreate_New_NFT_WalletRequest = {
fee?: uint64;
wallet_type: "nft_wallet";
did_id?: str;
name?: str;
};
export type TCreate_New_NFT_WalletResponse = {
success: True;
type: uint8;
wallet_id: uint32;
};
export type TCreate_New_Pool_WalletRequest = {
fee?: uint64;
wallet_type: "pool_wallet";
mode: "new";
initial_target_state: {
state: "SELF_POOLING";
} | {
state: "FARMING_TO_POOL";
target_puzzle_hash: str;
pool_url: str;
relative_lock_height: uint32;
};
p2_singleton_delayed_ph?: str;
p2_singleton_delay_time?: uint64;
} | {
fee?: uint64;
wallet_type: "pool_wallet";
mode: "recovery";
};
export type TCreate_New_Pool_WalletResponse = {
total_fee: uint64;
transaction: TransactionRecord;
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
launcher_id: str;
p2_singleton_puzzle_hash: str;
};
export type TCreateWalletErrorResponse = {
success: False;
error: str;
};
export declare const create_new_wallet_command = "create_new_wallet";
export type create_new_wallet_command = typeof create_new_wallet_command;
export type TCreateNewWalletRequestWithTx = TCreate_New_CAT_WalletRequest | TCreate_New_Pool_WalletRequest;
export type TCreateNewWalletRequestWithoutTx = TCreate_New_DID_WalletRequest | TCreate_New_NFT_WalletRequest;
export type TCreateNewWalletRequest = (TCreateNewWalletRequestWithTx | TCreateNewWalletRequestWithoutTx) & TXEndpointRequest;
export type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_NFT_WalletResponse | TCreate_New_Pool_WalletResponse | TCreateWalletErrorResponse;
export type GetCreateNewWalletResponse<REQ extends TCreateNewWalletRequest> = REQ extends TCreate_New_CAT_WalletRequest ? TCreate_New_CAT_WalletResponse : REQ extends TCreate_New_DID_WalletRequest ? REQ extends TCreateNewDidWalletRequestNew ? TCreateNewDidWalletResponseNew : TCreateNewDidWalletResponseRecovery : REQ extends TCreate_New_NFT_WalletRequest ? TCreate_New_NFT_WalletResponse : TCreate_New_Pool_WalletResponse;
export type WsCreateNewWalletMessage<R> = GetMessageType<chia_wallet_service, create_new_wallet_command, R>;
export declare function create_new_wallet<T extends TRPCAgent | TDaemon, D extends TCreateNewWalletRequest>(agent: T, data: D): Promise<ResType<T, D extends TCreateNewWalletRequestWithTx ? TxeResp<D, GetCreateNewWalletResponse<D>> : GetCreateNewWalletResponse<D>, WsCreateNewWalletMessage<D extends TCreateNewWalletRequestWithTx ? TxeResp<D, GetCreateNewWalletResponse<D>> : GetCreateNewWalletResponse<D>>>>;
export type WalletBalance = Balance & {
wallet_id: uint32;
wallet_type: int;
fingerprint?: int;
asset_id?: str;
};
export declare const get_wallet_balance_command = "get_wallet_balance";
export type get_wallet_balance_command = typeof get_wallet_balance_command;
export type TGetWalletBalanceRequest = {
wallet_id: int;
};
export type TGetWalletBalanceResponse = {
wallet_balance: WalletBalance;
};
export type WsGetWalletBalanceMessage = GetMessageType<chia_wallet_service, get_wallet_balance_command, TGetWalletBalanceResponse>;
export declare function get_wallet_balance<T extends TRPCAgent | TDaemon>(agent: T, data: TGetWalletBalanceRequest): Promise<ResType<T, TGetWalletBalanceResponse, WsGetWalletBalanceMessage>>;
export declare const get_wallet_balances_command = "get_wallet_balances";
export type get_wallet_balances_command = typeof get_wallet_balances_command;
export type TGetWalletBalancesRequest = {
wallet_ids: int[];
};
export type TGetWalletBalancesResponse = {
wallet_balances: Record<uint32, WalletBalance>;
};
export type WsGetWalletBalancesMessage = GetMessageType<chia_wallet_service, get_wallet_balances_command, TGetWalletBalancesResponse>;
export declare function get_wallet_balances<T extends TRPCAgent | TDaemon>(agent: T, data: TGetWalletBalancesRequest): Promise<ResType<T, TGetWalletBalancesResponse, WsGetWalletBalancesMessage>>;
export declare const get_transaction_command = "get_transaction";
export type get_transaction_command = typeof get_transaction_command;
export type TGetTransactionRequest = {
transaction_id: str;
};
export type TGetTransactionResponse = {
transaction: TransactionRecordConvenience;
transaction_id: TransactionRecord["name"];
};
export type WsGetTransactionMessage = GetMessageType<chia_wallet_service, get_transaction_command, TGetTransactionResponse>;
export declare function get_transaction<T extends TRPCAgent | TDaemon>(agent: T, data: TGetTransactionRequest): Promise<ResType<T, TGetTransactionResponse, WsGetTransactionMessage>>;
export declare const get_transactions_command = "get_transactions";
export type get_transactions_command = typeof get_transactions_command;
export type TGetTransactionsRequest = {
wallet_id: int;
start?: int;
end?: int;
sort_key?: str;
reverse?: bool;
to_address?: str;
type_filter?: TransactionTypeFilter;
confirmed?: bool;
};
export type TGetTransactionsResponse = {
transactions: TransactionRecordConvenienceWithMetadata[];
wallet_id: int;
};
export type WsGetTransactionsMessage = GetMessageType<chia_wallet_service, get_transactions_command, TGetTransactionsResponse>;
export declare function get_transactions<T extends TRPCAgent | TDaemon>(agent: T, data: TGetTransactionsRequest): Promise<ResType<T, TGetTransactionsResponse, WsGetTransactionsMessage>>;
export declare const get_next_address_command = "get_next_address";
export type get_next_address_command = typeof get_next_address_command;
export type TGetNextAddressRequest = {
new_address: bool;
wallet_id: int;
};
export type TGetNextAddressResponse = {
wallet_id: uint32;
address: str;
};
export type WsGetNextAddressMessage = GetMessageType<chia_wallet_service, get_next_address_command, TGetNextAddressResponse>;
export declare function get_next_address<T extends TRPCAgent | TDaemon>(agent: T, data: TGetNextAddressRequest): Promise<ResType<T, TGetNextAddressResponse, WsGetNextAddressMessage>>;
export declare const send_transaction_command = "send_transaction";
export type send_transaction_command = typeof send_transaction_command;
export type TSendTransactionRequest = {
wallet_id: uint32;
amount: int;
fee?: uint64;
address: str;
memos?: str[];
puzzle_decorator?: Array<{
decorator: str;
clawback_timelock?: uint64;
}>;
} & TXEndpointRequest;
export type TSendTransactionResponse = {
transaction: TransactionRecordConvenience;
transactions: TransactionRecordConvenience[];
transaction_id: TransactionRecord["name"];
signing_responses?: str[];
};
export type WsSendTransactionMessage<R> = GetMessageType<chia_wallet_service, send_transaction_command, R>;
export declare function send_transaction<T extends TRPCAgent | TDaemon, D extends TSendTransactionRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TSendTransactionResponse>, WsSendTransactionMessage<TxeResp<D, TSendTransactionResponse>>>>;
export declare const send_transaction_multi_command = "send_transaction_multi";
export type send_transaction_multi_command = typeof send_transaction_multi_command;
export type TSendTransactionMultiRequest = {
wallet_id: uint32;
} & (TCatSpendRequest | TCreateSignedTransactionRequest);
export type TSendTransactionMultiResponse = {
transaction: TransactionRecordConvenience;
transaction_id: TransactionRecordConvenience["name"];
transactions: TransactionRecordConvenience[];
unsigned_transactions: UnsignedTransaction[];
};
export type WsSendTransactionMultiMessage = GetMessageType<chia_wallet_service, send_transaction_multi_command, TSendTransactionMultiResponse>;
export declare function send_transaction_multi<T extends TRPCAgent | TDaemon>(agent: T, data: TSendTransactionMultiRequest): Promise<ResType<T, TSendTransactionMultiResponse, WsSendTransactionMultiMessage>>;
export declare const spend_clawback_coins_command = "spend_clawback_coins";
export type spend_clawback_coins_command = typeof spend_clawback_coins_command;
export type TSpendClawbackCoinsRequest = {
coin_ids: str[];
fee?: uint64;
batch_size: int;
force?: bool;
} & TXEndpointRequest;
export type TSpendClawbackCoinsResponse = {
success: True;
transaction_ids: str[];
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
};
export type WsSpendClawbackCoinsMessage<R> = GetMessageType<chia_wallet_service, spend_clawback_coins_command, R>;
export declare function spend_clawback_coins<T extends TRPCAgent | TDaemon, D extends TSpendClawbackCoinsRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TSpendClawbackCoinsResponse>, WsSpendClawbackCoinsMessage<TxeResp<D, TSpendClawbackCoinsResponse>>>>;
export declare const get_coin_records_command = "get_coin_records";
export type get_coin_records_command = typeof get_coin_records_command;
export type TGetCoinRecordsRequest = GetCoinRecords;
export type TGetCoinRecordsResponse = {
coin_records: WalletCoinRecordWithMetadata[];
total_count: uint32 | None;
};
export type WsGetCoinRecordsMessage = GetMessageType<chia_wallet_service, get_coin_records_command, TGetCoinRecordsResponse>;
export declare function get_coin_records<T extends TRPCAgent | TDaemon>(agent: T, data: TGetCoinRecordsRequest): Promise<ResType<T, TGetCoinRecordsResponse, WsGetCoinRecordsMessage>>;
export declare const get_transaction_count_command = "get_transaction_count";
export type get_transaction_count_command = typeof get_transaction_count_command;
export type TGetTransactionCountRequest = {
wallet_id: int;
type_filter?: TransactionTypeFilter;
confirmed?: bool;
};
export type TGetTransactionCountResponse = {
count: int;
wallet_id: int;
};
export type WsGetTransactionCountMessage = GetMessageType<chia_wallet_service, get_transaction_count_command, TGetTransactionCountResponse>;
export declare function get_transaction_count<T extends TRPCAgent | TDaemon>(agent: T, data: TGetTransactionCountRequest): Promise<ResType<T, TGetTransactionCountResponse, WsGetTransactionCountMessage>>;
export declare const get_farmed_amount_command = "get_farmed_amount";
export type get_farmed_amount_command = typeof get_farmed_amount_command;
export type TGetFarmedAmountResponse = {
farmed_amount: int;
pool_reward_amount: int;
farmer_reward_amount: int;
fee_amount: int;
last_height_farmed: int;
last_time_farmed: uint32;
blocks_won: uint32;
};
export type WsGetFarmedAmountMessage = GetMessageType<chia_wallet_service, get_farmed_amount_command, TGetFarmedAmountResponse>;
export declare function get_farmed_amount<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetFarmedAmountResponse, WsGetFarmedAmountMessage>>;
export type TAdditions = {
amount: uint64;
puzzle_hash: str;
memos?: str[];
};
export type TCoinAnnouncement = {
coin_id: str;
message: str;
morph_bytes?: str;
};
export type TPuzzleAnnouncement = {
puzzle_hash: str;
message: str;
morph_bytes?: str;
};
export declare const create_signed_transaction_command = "create_signed_transaction";
export type create_signed_transaction_command = typeof create_signed_transaction_command;
export type TCreateSignedTransactionRequest = {
wallet_id?: uint32;
additions: TAdditions[];
fee?: uint64;
coins?: Coin[];
coin_announcements?: TCoinAnnouncement[];
puzzle_announcements?: TPuzzleAnnouncement[];
morph_bytes?: True;
} & TXEndpointRequest;
export type TCreateSignedTransactionResponse = {
signed_txs: TransactionRecordConvenience[];
signed_tx: TransactionRecordConvenience;
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
};
export type WsCreateSignedTransactionMessage<R> = GetMessageType<chia_wallet_service, create_signed_transaction_command, R>;
export declare function create_signed_transaction<T extends TRPCAgent | TDaemon, D extends TCreateSignedTransactionRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TCreateSignedTransactionResponse>, WsCreateSignedTransactionMessage<TxeResp<D, TCreateSignedTransactionResponse>>>>;
export declare const delete_unconfirmed_transactions_command = "delete_unconfirmed_transactions";
export type delete_unconfirmed_transactions_command = typeof delete_unconfirmed_transactions_command;
export type TDeleteUnconfirmedTransactionsRequest = {
wallet_id: uint32;
};
export type TDeleteUnconfirmedTransactionsResponse = Record<string, never>;
export type WsDeleteUnconfirmedTransactionsMessage = GetMessageType<chia_wallet_service, delete_unconfirmed_transactions_command, TDeleteUnconfirmedTransactionsResponse>;
export declare function delete_unconfirmed_transactions<T extends TRPCAgent | TDaemon>(agent: T, data: TDeleteUnconfirmedTransactionsRequest): Promise<ResType<T, TDeleteUnconfirmedTransactionsResponse, WsDeleteUnconfirmedTransactionsMessage>>;
export declare const select_coins_command = "select_coins";
export type select_coins_command = typeof select_coins_command;
export type TSelectCoinsRequest = {
amount: uint64;
wallet_id: uint32;
exclude_coins?: Optional<Coin[]>;
excluded_coins?: Optional<Coin[]>;
} & TXConfigLoader;
export type TSelectCoinsResponse = {
coins: Coin[];
};
export type WsSelectCoinsMessage = GetMessageType<chia_wallet_service, select_coins_command, TSelectCoinsResponse>;
export declare function select_coins<T extends TRPCAgent | TDaemon>(agent: T, data: TSelectCoinsRequest): Promise<ResType<T, TSelectCoinsResponse, WsSelectCoinsMessage>>;
export declare const get_spendable_coins_command = "get_spendable_coins";
export type get_spendable_coins_command = typeof get_spendable_coins_command;
export type TGetSpendableCoinsRequest = {
wallet_id: uint32;
min_coin_amount?: uint64;
max_coin_amount?: uint64;
excluded_coin_amounts?: Optional<uint64[]>;
excluded_coins?: Coin[];
excluded_coin_ids?: str[];
};
export type TGetSpendableCoinsResponse = {
confirmed_records: CoinRecord[];
unconfirmed_removals: CoinRecord[];
unconfirmed_additions: Coin[];
};
export type WsGetSpendableCoinsMessage = GetMessageType<chia_wallet_service, get_spendable_coins_command, TGetSpendableCoinsResponse>;
export declare function get_spendable_coins<T extends TRPCAgent | TDaemon>(agent: T, data: TGetSpendableCoinsRequest): Promise<ResType<T, TGetSpendableCoinsResponse, WsGetSpendableCoinsMessage>>;
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: CoinRecord[];
};
export type WsGetCoinRecordsByNamesMessage = GetMessageType<chia_wallet_service, get_coin_records_by_names_command, TGetCoinRecordsByNamesResponse>;
export declare function get_coin_records_by_names<T extends TRPCAgent | TDaemon>(agent: T, data: TGetCoinRecordsByNamesRequest): Promise<ResType<T, TGetCoinRecordsByNamesResponse, WsGetCoinRecordsByNamesMessage>>;
export declare const get_current_derivation_index_command = "get_current_derivation_index";
export type get_current_derivation_index_command = typeof get_current_derivation_index_command;
export type TGetCurrentDerivationIndexResponse = {
success: True;
index: Optional<uint32>;
};
export type WsGetCurrentDerivationIndexMessage = GetMessageType<chia_wallet_service, get_current_derivation_index_command, TGetCurrentDerivationIndexResponse>;
export declare function get_current_derivation_index<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetCurrentDerivationIndexResponse, WsGetCurrentDerivationIndexMessage>>;
export declare const extend_derivation_index_command = "extend_derivation_index";
export type extend_derivation_index_command = typeof extend_derivation_index_command;
export type TExtendDerivationIndexRequest = {
index: uint32;
};
export type TExtendDerivationIndexResponse = {
success: True;
index: Optional<uint32>;
};
export type WsExtendDerivationIndexMessage = GetMessageType<chia_wallet_service, extend_derivation_index_command, TExtendDerivationIndexResponse>;
export declare function extend_derivation_index<T extends TRPCAgent | TDaemon>(agent: T, data: TExtendDerivationIndexRequest): Promise<ResType<T, TExtendDerivationIndexResponse, WsExtendDerivationIndexMessage>>;
export declare const get_notifications_command = "get_notifications";
export type get_notifications_command = typeof get_notifications_command;
export type TGetNotificationsRequest = GetNotifications;
export type TGetNotificationsResponse = GetNotificationsResponse;
export type WsGetNotificationsMessage = GetMessageType<chia_wallet_service, get_notifications_command, TGetNotificationsResponse>;
export declare function get_notifications<T extends TRPCAgent | TDaemon>(agent: T, data: TGetNotificationsRequest): Promise<ResType<T, GetNotificationsResponse, WsGetNotificationsMessage>>;
export declare const delete_notifications_command = "delete_notifications";
export type delete_notifications_command = typeof delete_notifications_command;
export type TDeleteNotificationsRequest = {
ids?: str[];
};
export type TDeleteNotificationsResponse = Record<string, never>;
export type WsDeleteNotificationsMessage = GetMessageType<chia_wallet_service, delete_notifications_command, TDeleteNotificationsResponse>;
export declare function delete_notifications<T extends TRPCAgent | TDaemon>(agent: T, data: TDeleteNotificationsRequest): Promise<ResType<T, TDeleteNotificationsResponse, WsDeleteNotificationsMessage>>;
export declare const send_notification_command = "send_notification";
export type send_notification_command = typeof send_notification_command;
export type TSendNotificationRequest = {
target: str;
message: str;
amount: uint64;
fee?: uint64;
} & TXEndpointRequest;
export type TSendNotificationResponse = {
tx: TransactionRecordConvenience;
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
};
export type WsSendNotificationMessage<R> = GetMessageType<chia_wallet_service, send_notification_command, R>;
export declare function send_notification<T extends TRPCAgent | TDaemon, D extends TSendNotificationRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TSendNotificationResponse>, WsSendNotificationMessage<TxeResp<D, TSendNotificationResponse>>>>;
export declare const verify_signature_command = "verify_signature";
export type verify_signature_command = typeof verify_signature_command;
export type TVerifySignatureRequest = {
message: str;
signing_mode?: SigningMode;
pubkey: str;
signature: str;
address?: str;
};
export type TVerifySignatureResponse = {
isValid: True;
} | {
isValid: False;
error: str;
};
export type WsVerifySignatureMessage = GetMessageType<chia_wallet_service, verify_signature_command, TVerifySignatureResponse>;
export declare function verify_signature<T extends TRPCAgent | TDaemon>(agent: T, data: TVerifySignatureRequest): Promise<ResType<T, TVerifySignatureResponse, WsVerifySignatureMessage>>;
export declare const get_transaction_memo_command = "get_transaction_memo";
export type get_transaction_memo_command = typeof get_transaction_memo_command;
export type TGetTransactionMemoRequest = {
transaction_id: str;
};
export type TGetTransactionMemoResponse = {
[transaction_id: string]: {
[coin_id: string]: string[];
};
};
export type WsGetTransactionMemoMessage = GetMessageType<chia_wallet_service, get_transaction_memo_command, TGetTransactionMemoResponse>;
export declare function get_transaction_memo<T extends TRPCAgent | TDaemon>(agent: T, data: TGetTransactionMemoRequest): Promise<ResType<T, TGetTransactionMemoResponse, WsGetTransactionMemoMessage>>;
export declare const split_coins_command = "split_coins";
export type split_coins_command = typeof split_coins_command;
export type TSplitCoinsRequest = SplitCoins | SplitCoinsCHIP0029;
export type TSplitCoinsResponse = SplitCoinsResponse | SplitCoinsResponseCHIP0029;
export type WsSplitCoinsMessage<R> = GetMessageType<chia_wallet_service, split_coins_command, R>;
export declare function split_coins<T extends TRPCAgent | TDaemon, D extends TSplitCoinsRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, D extends {
"CHIP-0029": true;
} ? import("../../chia/rpc/wallet_request_types").TransactionEndpointResponse : import("../../chia/rpc/wallet_request_types").TransactionEndpointResponseCHIP0029>, WsSplitCoinsMessage<TxeResp<D, D extends {
"CHIP-0029": true;
} ? import("../../chia/rpc/wallet_request_types").TransactionEndpointResponse : import("../../chia/rpc/wallet_request_types").TransactionEndpointResponseCHIP0029>>>>;
export declare const combine_coins_command = "combine_coins";
export type combine_coins_command = typeof combine_coins_command;
export type TCombineCoinsRequest = CombineCoins & CombineCoinsCHIP0029;
export type TCombineCoinsResponse = CombineCoinsResponse | CombineCoinsResponseCHIP0029;
export type WsCombineCoinsMessage<R> = GetMessageType<chia_wallet_service, combine_coins_command, R>;
export declare function combine_coins<T extends TRPCAgent | TDaemon, D extends TCombineCoinsRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, D extends {
"CHIP-0029": true;
} ? TCombineCoinsResponse : import("../../chia/rpc/wallet_request_types").TransactionEndpointResponseCHIP0029>, WsCombineCoinsMessage<TxeResp<D, D extends {
"CHIP-0029": true;
} ? TCombineCoinsResponse : import("../../chia/rpc/wallet_request_types").TransactionEndpointResponseCHIP0029>>>>;
export declare const sign_message_by_address_command = "sign_message_by_address";
export type sign_message_by_address_command = typeof sign_message_by_address_command;
export type TSignMessageByAddressRequest = {
address: str;
message: str;
is_hex?: bool;
safe_mode?: bool;
};
export type TSignMessageByAddressResponse = {
success: True;
pubkey: str;
signature: str;
signing_mode: SigningMode;
};
export type WsSignMessageByAddressMessage = GetMessageType<chia_wallet_service, sign_message_by_address_command, TSignMessageByAddressResponse>;
export declare function sign_message_by_address<T extends TRPCAgent | TDaemon>(agent: T, data: TSignMessageByAddressRequest): Promise<ResType<T, TSignMessageByAddressResponse, WsSignMessageByAddressMessage>>;
export declare const sign_message_by_id_command = "sign_message_by_id";
export type sign_message_by_id_command = typeof sign_message_by_id_command;
export type TSignMessageByIdRequest = {
id: str;
message: str;
is_hex?: bool;
safe_mode?: bool;
};
export type TSignMessageByIdResponse = {
success: False;
error: str;
} | {
success: True;
pubkey: str;
signature: str;
latest_coin_id: str | None;
signing_mode: SigningMode;
};
export type WsSignMessageByIdMessage = GetMessageType<chia_wallet_service, sign_message_by_id_command, TSignMessageByIdResponse>;
export declare function sign_message_by_id<T extends TRPCAgent | TDaemon>(agent: T, data: TSignMessageByIdRequest): Promise<ResType<T, TSignMessageByIdResponse, WsSignMessageByIdMessage>>;
export declare const get_cat_list_command = "get_cat_list";
export type get_cat_list_command = typeof get_cat_list_command;
export type TGetCatListResponse = {
cat_list: CAT[];
};
export type WsGetCatListMessage = GetMessageType<chia_wallet_service, get_cat_list_command, TGetCatListResponse>;
export declare function get_cat_list<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetCatListResponse, WsGetCatListMessage>>;
export declare const cat_set_name_command = "cat_set_name";
export type cat_set_name_command = typeof cat_set_name_command;
export type TCatSetNameRequest = {
wallet_id: uint32;
name: str;
};
export type TCatSetNameResponse = {
wallet_id: uint32;
};
export type WsCatSetNameMessage = GetMessageType<chia_wallet_service, cat_set_name_command, TCatSetNameResponse>;
export declare function cat_set_name<T extends TRPCAgent | TDaemon>(agent: T, data: TCatSetNameRequest): Promise<ResType<T, TCatSetNameResponse, WsCatSetNameMessage>>;
export declare const cat_asset_id_to_name_command = "cat_asset_id_to_name";
export type cat_asset_id_to_name_command = typeof cat_asset_id_to_name_command;
export type TCatAssetIdToNameRequest = {
asset_id: str;
};
export type TCatAssetIdToNameResponse = {
wallet_id: Optional<uint32>;
name: str;
};
export type WsCatAssetIdToNameMessage = GetMessageType<chia_wallet_service, cat_asset_id_to_name_command, TCatAssetIdToNameResponse>;
export declare function cat_asset_id_to_name<T extends TRPCAgent | TDaemon>(agent: T, data: TCatAssetIdToNameRequest): Promise<ResType<T, TCatAssetIdToNameResponse, WsCatAssetIdToNameMessage>>;
export declare const cat_get_name_command = "cat_get_name";
export type cat_get_name_command = typeof cat_get_name_command;
export type TCatGetNameRequest = {
wallet_id: uint32;
};
export type TCatGetNameResponse = {
wallet_id: uint32;
name: str;
};
export type WsCatGetNameMessage = GetMessageType<chia_wallet_service, cat_get_name_command, TCatGetNameResponse>;
export declare function cat_get_name<T extends TRPCAgent | TDaemon>(agent: T, data: TCatGetNameRequest): Promise<ResType<T, TCatGetNameResponse, WsCatGetNameMessage>>;
export declare const get_stray_cats_command = "get_stray_cats";
export type get_stray_cats_command = typeof get_stray_cats_command;
export type TGetStrayCatsResponse = {
stray_cats: Array<{
asset_id: str;
name: str;
first_seen_height: int;
sender_puzzle_hash: str;
}>;
};
export type WsGetStrayCatsMessage = GetMessageType<chia_wallet_service, get_stray_cats_command, TGetStrayCatsResponse>;
export declare function get_stray_cats<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetStrayCatsResponse, WsGetStrayCatsMessage>>;
export declare const cat_spend_command = "cat_spend";
export type cat_spend_command = typeof cat_spend_command;
export type TCatSpendRequest = {
wallet_id: uint32;
additions?: TAdditions[];
fee: uint64;
amount: uint64;
inner_address: str;
memos?: str[];
coins?: Coin[];
extra_delta?: int;
tail_reveal?: str;
tail_solution?: str;
} & TXEndpointRequest;
export type TCatSpendResponse = {
transaction: TransactionRecordConvenience;
transaction_id: TransactionRecord["name"];
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
};
export type WsCatSpendMessage<R> = GetMessageType<chia_wallet_service, cat_spend_command, R>;
export declare function cat_spend<T extends TRPCAgent | TDaemon, D extends TCatSpendRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TCatSpendResponse>, WsCatSpendMessage<TxeResp<D, TCatSpendResponse>>>>;
export declare const cat_get_asset_id_command = "cat_get_asset_id";
export type cat_get_asset_id_command = typeof cat_get_asset_id_command;
export type TCatGetAssetIdRequest = {
wallet_id: uint32;
};
export type TCatGetAssetIdResponse = {
asset_id: str;
wallet_id: uint32;
};
export type WsCatGetAssetIdMessage = GetMessageType<chia_wallet_service, cat_get_asset_id_command, TCatGetAssetIdResponse>;
export declare function cat_get_asset_id<T extends TRPCAgent | TDaemon>(agent: T, data: TCatGetAssetIdRequest): Promise<ResType<T, TCatGetAssetIdResponse, WsCatGetAssetIdMessage>>;
export declare const create_offer_for_ids_command = "create_offer_for_ids";
export type create_offer_for_ids_command = typeof create_offer_for_ids_command;
export type TCreateOfferForIdsRequest = {
offer: Record<int, int>;
fee?: uint64;
validate_only?: bool;
driver_dict?: TDriverDict;
solver?: Record<str, any>;
} & TXEndpointRequest;
export type TCreateOfferForIdsResponse = {
offer: str;
trade_record: TradeRecordConvenience;
transactions: TransactionRecordConvenience[];
signing_responses?: str[];
};
export type WsCreateOfferForIdsMessage<R> = GetMessageType<chia_wallet_service, create_offer_for_ids_command, R>;
export declare function create_offer_for_ids<T extends TRPCAgent | TDaemon, D extends TCreateOfferForIdsRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TCreateOfferForIdsResponse>, WsCreateOfferForIdsMessage<TxeResp<D, TCreateOfferForIdsResponse>>>>;
export declare const get_offer_summary_command = "get_offer_summary";
export type get_offer_summary_command = typeof get_offer_summary_command;
export type TGetOfferSummaryRequest = {
offer: str;
advanced?: bool;
};
export type TGetOfferSummaryResponse = {
summary: {
offered: Record<str, int>;
requested: Record<str, int>;
fees: int;
infos: TDriverDict;
additions: str[];
removals: str[];
valid_times: Omit<ConditionValidTimes, "max_secs_after_created" | "min_secs_since_created" | "max_blocks_after_created" | "min_blocks_since_created">;
};
id: bytes32;
};
export type WsGetOfferSummaryMessage = GetMessageType<chia_wallet_service, get_offer_summary_command, TGetOfferSummaryResponse>;
export declare function get_offer_summary<T extends TRPCAgent | TDaemon>(agent: T, data: TGetOfferSummaryRequest): Promise<ResType<T, TGetOfferSummaryResponse, WsGetOfferSummaryMessage>>;
export declare const check_offer_validity_command = "check_offer_validity";
export type check_offer_validity_command = typeof check_offer_validity_command;
export type TCheckOfferValidityRequest = {
offer: str;
};
export type TCheckOfferValidityResponse = {
valid: bool;
id: bytes32;
};
export type WsCheckOfferValidityMessage = GetMessageType<chia_wallet_service, check_offer_validity_command, TCheckOfferValidityResponse>;
export declare function check_offer_validity<T extends TRPCAgent | TDaemon>(agent: T, data: TCheckOfferValidityRequest): Promise<ResType<T, TCheckOfferValidityResponse, WsCheckOfferValidityMessage>>;
export declare const take_offer_command = "take_offer";
export type take_offer_command = typeof take_offer_command;
export type TTakeOfferRequest = {
offer: str;
fee?: uint64;
solver?: Record<str, any>;
} & TXEndpointRequest;
export type TTakeOfferResponse = {
trade_record: TradeRecordConvenience;
offer: str;
transactions: TransactionRecordConvenience[];
signing_responses: SigningResponse[] | str[];
};
export type WsTakeOfferMessage<R> = GetMessageType<chia_wallet_service, take_offer_command, R>;
export declare function take_offer<T extends TRPCAgent | TDaemon, D extends TTakeOfferRequest>(agent: T, data: D): Promise<ResType<T, TxeResp<D, TTakeOfferResponse>, WsTakeOfferMessage<TxeResp<D, TTakeOfferResponse>>>>;
export declare const get_offer_command = "get_offer";
export type get_offer_command = typeof get_offer_command;
export type TGetOfferRequest = {
trade_id: str;
file_contents?: bool;
};
export type TGetOfferResponse = {
trade_record: TradeRecordConvenience;
offer: Optional<str>;
};
export type WsGetOfferMessage = GetMessageType<chia_wallet_service, get_offer_command, TGetOfferResponse>;
export declare function get_offer<T extends TRPCAgent | TDaemon>(agent: T, data: TGetOfferRequest): Promise<ResType<T, TGetOfferResponse, WsGetOfferMessage>>;
export declare const get_all_offers_command = "get_all_offers";
export type get_all_offers_command = typeof get_all_offers_command;
export type TGetAllOffersRequest = {
start?: int;
end?: int;
exclude_my_offers?: bool;
exclude_taken_offers?: bool;
include_completed?: bool;
sort_key?: str;
reverse?: bool;
file_contents?: bool;
};
export type TGetAllOffersResponse = {
trade_records: TradeRecordConvenience[];
offers: Optional<str[]>;
};
export type WsGetAllOffersMessage = GetMessageType<chia_wallet_service, get_all_offers_command, TGetAllOffersResponse>;
export declare function get_all_offers<T extends TRPCAgent | TDaemon>(agent: T, data: TGetAllOffersRequest): Promise<ResType<T, TGetAllOffersResponse, WsGetAllOffersMessage>>;
export declare const get_offers_count_command = "get_offers_count";
export type get_offers_count_command = typeof get_offers_count_command;
export type TGetOffersCountResponse = {
total: int;
my_offers_count: int;
taken_offers_count: int;
};
export type WsGetOffersCountMessage = GetMessageType<chia_wallet_service, get_offers_count_command, TGetOffersCountResponse>;
export declare function get_offers_count<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetOffersCountResponse, WsGetOffersCountMessage>>;
export declare const cancel_offer_command = "cancel_offer";
export type cancel_offer_command = typeof cancel_offer_command;
export type TCancelOfferRequest = {
secure: bool;
trade_id: str;
fee?