chia-agent 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.0.0]
4
+ ### Breaking Change
5
+ - At chia-blockchain@1.3.4, in `chia/consensus/cost_calculator.py`,
6
+ `NPCResult.npc_list` was removed and `NPCResult.conds` was added.
7
+ As a result, the RPC APIs below might be incompatible between `1.3.3` and `1.3.4`.
8
+ - `get_all_mempool_items` Of FullNode RPC API
9
+ - `get_mempool_item_by_tx_id` Of FullNode RPC API
10
+ ### Added
11
+ - [New FullNode RPC API](./src/api/rpc/full_node)
12
+ - [`get_coin_records_by_hint`](./src/api/rpc/full_node/README.md#get_coin_records_by_hintagent-params)
13
+ - [New Wallet RPC API](./src/api/rpc/wallet)
14
+ - [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params)
15
+ - [`get_stray_cats`](./src/api/rpc/wallet/README.md#get_stray_catsagent)
16
+ ### Changed
17
+ - [FullNode RPC API](./src/api/rpc/full_node)
18
+ - Updated [`get_additions_and_removals`](./src/api/rpc/full_node/README.md#get_additions_and_removalsagent-params)
19
+ - [Wallet RPC API](./src/api/rpc/wallet)
20
+ - Updated [`get_wallets`](./src/api/rpc/wallet/README.md#get_walletsagent-params)
21
+ - Updated [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params)
22
+ - The following APIs changed because a new property was added to `TradeRecord` class at `chia/wallet/trade_record.py`
23
+ This is not a breaking change because just adding a property is backward compatible.
24
+ - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
25
+ - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
26
+ - [`get_offer`](./src/api/rpc/wallet/README.md#get_offeragent-params)
27
+ - [`get_all_offers`](./src/api/rpc/wallet/README.md#get_all_offersagent-params)
28
+ ### Fixed
29
+ - Fixed issues where the following full_node RPC APIs were not exported from `api/rpc/index.ts`.
30
+ - `get_coin_record_by_names`
31
+ - `get_coin_records_by_parent_ids`
32
+ - Fixed issues where the following wallet RPC APIs were not exported from `api/rpc/index.ts`.
33
+ - `delete_unconfirmed_transactions`
34
+ - Fixed an issue where README description of `get_blockchain_state` of FullNode RPC API was missing some properties.
35
+
3
36
  ## [4.0.0]
4
37
  ### Breaking Change
5
38
  - At chia-blockchain@1.3.0, in `chia/consensus/cost_calculator.py`,
@@ -320,6 +353,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
320
353
  Initial release.
321
354
 
322
355
  <!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
356
+ [5.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v4.0.0...v5.0.0
323
357
  [4.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v3.0.1...v4.0.0
324
358
  [3.0.1]: https://github.com/Chia-Mine/chia-agent/compare/v3.0.0...v3.0.1
325
359
  [3.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v2.0.6...v3.0.0
package/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
  [![npm version](https://badge.fury.io/js/chia-agent.svg)](https://badge.fury.io/js/chia-agent) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
3
 
4
4
  chia rpc/websocket client library for NodeJS.
5
- Supports all RPC/Websocket API available at `chia 1.3.0`.
5
+ Supports all RPC/Websocket API available at `chia 1.3.4`.
6
6
  \(If you need previous version, search for the corresponding release [here](https://github.com/Chia-Mine/chia-agent/releases)\)
7
7
 
8
8
  you can develop your own nodejs script with `chia-agent` to:
9
- - retrieve latest data from RPC servers like `farmer`, `harvester`, `full_node`, `wallet`, `pool`.
9
+ - retrieve latest data from RPC servers like `farmer`, `harvester`, `full_node`, `wallet`, `pool`, `crawler`.
10
10
  - send email when proof is found.
11
11
  - trigger scripts when target event is observed.
12
12
  - start/stop services.
@@ -22,8 +22,8 @@ yarn add chia-agent
22
22
 
23
23
  ## Compatibility
24
24
  This code is compatible with:
25
- - [`0e7cc5a88393ef02b4057dd4bf894be2e73bc00b`](https://github.com/Chia-Network/chia-blockchain/tree/0e7cc5a88393ef02b4057dd4bf894be2e73bc00b) of [chia-blockchain@1.3.0](https://github.com/Chia-Network/chia-blockchain)
26
- - [Diff to the latest chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/0e7cc5a88393ef02b4057dd4bf894be2e73bc00b...main)
25
+ - [`d154105a6b35f94649f15bca4e3fb8a11a39e70e`](https://github.com/Chia-Network/chia-blockchain/tree/d154105a6b35f94649f15bca4e3fb8a11a39e70e) of [chia-blockchain 1.3.4](https://github.com/Chia-Network/chia-blockchain)
26
+ - [Diff to the latest chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/d154105a6b35f94649f15bca4e3fb8a11a39e70e...main)
27
27
  - [`374e7e6dc2d6d7941bb650f0e4ac5c01db104569`](https://github.com/Chia-Network/pool-reference/tree/374e7e6dc2d6d7941bb650f0e4ac5c01db104569) of [pool-reference](https://github.com/Chia-Network/pool-reference)
28
28
  - [Diff to the latest pool-reference](https://github.com/Chia-Network/pool-reference/compare/374e7e6dc2d6d7941bb650f0e4ac5c01db104569...main)
29
29
 
@@ -32,7 +32,7 @@ There are 2 kinds of APIs in chia.
32
32
  `RPC API` and `Websocket API`.
33
33
 
34
34
  ### RPC API
35
- RPC API is used to send message directly to chia services like `farmer`, `harvester`, `full_node`, `wallet`.
35
+ RPC API is used to send message directly to chia services like `farmer`, `harvester`, `full_node`, `wallet`, `crawler`.
36
36
 
37
37
  RPC API is just an async function in a traditional request/response style.
38
38
 
@@ -1,7 +1,7 @@
1
- import { NPC } from "../types/name_puzzle_condition";
1
+ import { SpendBundleConditions } from "../types/spend_bundle_condition";
2
2
  import { Optional, uint16, uint64 } from "../types/_python_types_";
3
3
  export declare type NPCResult = {
4
4
  error: Optional<uint16>;
5
- npc_list: NPC[];
5
+ conds: Optional<SpendBundleConditions>;
6
6
  cost: uint64;
7
7
  };
@@ -0,0 +1,18 @@
1
+ import { bytes32, bytes48 } from "./blockchain_format/sized_bytes";
2
+ import { bytes, Optional, uint32, uint64 } from "./_python_types_";
3
+ export declare type Spend = {
4
+ coin_id: bytes32;
5
+ puzzle_hash: bytes32;
6
+ height_relative: Optional<uint32>;
7
+ seconds_relative: uint64;
8
+ create_coin: Array<[bytes32, uint64, bytes]>;
9
+ agg_sig_me: Array<[bytes48, bytes]>;
10
+ };
11
+ export declare type SpendBundleConditions = {
12
+ spends: Spend[];
13
+ reserve_fee: uint64;
14
+ height_absolute: uint32;
15
+ seconds_absolute: uint64;
16
+ agg_sig_unsafe: Array<[bytes48, bytes]>;
17
+ cost: uint64;
18
+ };
@@ -18,6 +18,7 @@ export declare type TradeRecordConvenience = {
18
18
  summary: {
19
19
  offered: Record<str, int>;
20
20
  requested: Record<str, int>;
21
+ fees: int;
21
22
  };
22
23
  pending: Record<str, int>;
23
24
  } & Omit<TradeRecord, "offer">;
@@ -2,7 +2,7 @@ import { FullBlock } from "../../chia/types/full_block";
2
2
  import { BlockRecord } from "../../chia/consensus/block_record";
3
3
  import { bool, float, int, Optional, str, uint128, uint32, uint64 } from "../../chia/types/_python_types_";
4
4
  import { UnfinishedHeaderBlock } from "../../chia/types/unfinished_header_block";
5
- import { CoinRecord, CoinRecordBackwardCompatible } from "../../chia/types/coin_record";
5
+ import { CoinRecordBackwardCompatible } from "../../chia/types/coin_record";
6
6
  import { SpendBundle } from "../../chia/types/spend_bundle";
7
7
  import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
8
8
  import { MempoolItem } from "../../chia/types/mempool_item";
@@ -30,12 +30,12 @@ export declare type TGetBlockchainStateResponse = {
30
30
  space: uint128;
31
31
  mempool_size: int;
32
32
  mempool_cost: int;
33
- "mempool_min_fees": {
34
- "cost_5000000": float;
33
+ mempool_min_fees: {
34
+ cost_5000000: float;
35
35
  };
36
- "mempool_max_total_cost": int;
37
- "block_max_cost": int;
38
- "node_id": str;
36
+ mempool_max_total_cost: int;
37
+ block_max_cost: int;
38
+ node_id: str;
39
39
  };
40
40
  };
41
41
  export declare function get_blockchain_state(agent: TRPCAgent): Promise<TGetBlockchainStateResponse>;
@@ -123,8 +123,8 @@ export declare type TGetAdditionsAndRemovalsRequest = {
123
123
  header_hash: str;
124
124
  };
125
125
  export declare type TGetAdditionsAndRemovalsResponse = {
126
- additions: CoinRecord[];
127
- removals: CoinRecord[];
126
+ additions: CoinRecordBackwardCompatible[];
127
+ removals: CoinRecordBackwardCompatible[];
128
128
  };
129
129
  export declare function get_additions_and_removals(agent: TRPCAgent, data: TGetAdditionsAndRemovalsRequest): Promise<TGetAdditionsAndRemovalsResponse>;
130
130
  export declare const get_initial_freeze_period_command_of_full_node = "get_initial_freeze_period";
@@ -215,6 +215,19 @@ export declare type TGetCoinRecordsByParentIdsRequest = {
215
215
  export declare type TGetCoinRecordsByParentIdsResponse = {
216
216
  coin_records: CoinRecordBackwardCompatible[];
217
217
  };
218
+ export declare function get_coin_records_by_parent_ids(agent: TRPCAgent, data: TGetCoinRecordsByParentIdsRequest): Promise<TGetCoinRecordsByParentIdsResponse>;
219
+ export declare const get_coin_records_by_hint_command = "get_coin_records_by_hint";
220
+ export declare type get_coin_records_by_hint_command = typeof get_coin_records_by_hint_command;
221
+ export declare type TGetCoinRecordsByHintRequest = {
222
+ hint: str;
223
+ start_height?: uint32;
224
+ end_height?: uint32;
225
+ include_spent_coins?: bool;
226
+ };
227
+ export declare type TGetCoinRecordsByHintResponse = {
228
+ coin_records: CoinRecordBackwardCompatible[];
229
+ };
230
+ export declare function get_coin_records_by_hint(agent: TRPCAgent, data: TGetCoinRecordsByHintRequest): Promise<TGetCoinRecordsByHintResponse>;
218
231
  export declare const push_tx_command = "push_tx";
219
232
  export declare type push_tx_command = typeof push_tx_command;
220
233
  export declare type TPushTxRequest = {
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.get_mempool_item_by_tx_id = exports.get_mempool_item_by_tx_id_command = exports.get_all_mempool_items = exports.get_all_mempool_items_command = exports.get_all_mempool_tx_ids = exports.get_all_mempool_tx_ids_command = exports.get_puzzle_and_solution = exports.get_puzzle_and_solution_command = exports.push_tx = exports.push_tx_command = exports.get_coin_records_by_parent_ids_command = exports.get_coin_records_by_names = exports.get_coin_records_by_names_command = exports.get_coin_record_by_name = exports.get_coin_record_by_name_command = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hashes_command = exports.get_coin_records_by_puzzle_hash = exports.get_coin_records_by_puzzle_hash_command = exports.get_recent_signage_point_or_eos = exports.get_recent_signage_point_or_eos_command = exports.get_network_info_of_full_node = exports.get_network_info_command_of_full_node = exports.get_initial_freeze_period_of_full_node = exports.get_initial_freeze_period_command_of_full_node = exports.get_additions_and_removals = exports.get_additions_and_removals_command = exports.get_network_space = exports.get_network_space_command = exports.get_unfinished_block_headers = exports.get_unfinished_block_headers_command = exports.get_block_records = exports.get_block_records_command = exports.get_block_record = exports.get_block_record_command = exports.get_block_record_by_height = exports.get_block_record_by_height_command = exports.get_block_count_metrics = exports.get_block_count_metrics_command = exports.get_blocks = exports.get_blocks_command = exports.get_block = exports.get_block_command = exports.get_blockchain_state = exports.get_blockchain_state_command = exports.chia_full_node_service = void 0;
12
+ exports.get_mempool_item_by_tx_id = exports.get_mempool_item_by_tx_id_command = exports.get_all_mempool_items = exports.get_all_mempool_items_command = exports.get_all_mempool_tx_ids = exports.get_all_mempool_tx_ids_command = exports.get_puzzle_and_solution = exports.get_puzzle_and_solution_command = exports.push_tx = exports.push_tx_command = exports.get_coin_records_by_hint = exports.get_coin_records_by_hint_command = exports.get_coin_records_by_parent_ids = exports.get_coin_records_by_parent_ids_command = exports.get_coin_records_by_names = exports.get_coin_records_by_names_command = exports.get_coin_record_by_name = exports.get_coin_record_by_name_command = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hashes_command = exports.get_coin_records_by_puzzle_hash = exports.get_coin_records_by_puzzle_hash_command = exports.get_recent_signage_point_or_eos = exports.get_recent_signage_point_or_eos_command = exports.get_network_info_of_full_node = exports.get_network_info_command_of_full_node = exports.get_initial_freeze_period_of_full_node = exports.get_initial_freeze_period_command_of_full_node = exports.get_additions_and_removals = exports.get_additions_and_removals_command = exports.get_network_space = exports.get_network_space_command = exports.get_unfinished_block_headers = exports.get_unfinished_block_headers_command = exports.get_block_records = exports.get_block_records_command = exports.get_block_record = exports.get_block_record_command = exports.get_block_record_by_height = exports.get_block_record_by_height_command = exports.get_block_count_metrics = exports.get_block_count_metrics_command = exports.get_blocks = exports.get_blocks_command = exports.get_block = exports.get_block_command = exports.get_blockchain_state = exports.get_blockchain_state_command = exports.chia_full_node_service = void 0;
13
13
  exports.chia_full_node_service = "chia_full_node";
14
14
  exports.get_blockchain_state_command = "get_blockchain_state";
15
15
  function get_blockchain_state(agent) {
@@ -131,6 +131,19 @@ function get_coin_records_by_names(agent, data) {
131
131
  }
132
132
  exports.get_coin_records_by_names = get_coin_records_by_names;
133
133
  exports.get_coin_records_by_parent_ids_command = "get_coin_records_by_parent_ids";
134
+ function get_coin_records_by_parent_ids(agent, data) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ return agent.sendMessage(exports.chia_full_node_service, exports.get_coin_records_by_parent_ids_command, data);
137
+ });
138
+ }
139
+ exports.get_coin_records_by_parent_ids = get_coin_records_by_parent_ids;
140
+ exports.get_coin_records_by_hint_command = "get_coin_records_by_hint";
141
+ function get_coin_records_by_hint(agent, data) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ return agent.sendMessage(exports.chia_full_node_service, exports.get_coin_records_by_hint_command, data);
144
+ });
145
+ }
146
+ exports.get_coin_records_by_hint = get_coin_records_by_hint;
134
147
  exports.push_tx_command = "push_tx";
135
148
  function push_tx(agent, data) {
136
149
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,19 +1,19 @@
1
1
  import type { TGetRewardTargetResponse, TGetSignagePointResponse, TGetSignagePointsResponse, TSetRewardTargetResponse, TGetHarvestersResponse, TSetPayoutInstructionsResponse, TGetPoolStateResponse } from "./farmer/index";
2
2
  export { chia_farmer_service, TGetRewardTargetRequest, TGetRewardTargetResponse, TGetSignagePointRequest, TGetSignagePointResponse, TGetSignagePointsRequest, TGetSignagePointsResponse, TSetRewardTargetRequest, TSetRewardTargetResponse, TGetHarvestersRequest, TGetHarvestersResponse, TSetPayoutInstructionsRequest, TSetPayoutInstructionsResponse, TGetPoolStateRequest, TGetPoolStateResponse, get_reward_targets, get_signage_point, get_signage_points, set_reward_targets, get_harvesters, set_pool_payout_instructions, get_pool_state, } from "./farmer/index";
3
- import type { TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightResponse, TGetBlockRecordResponse, TGetBlockRecordsResponse, TGetBlockResponse, TGetBlockchainStateResponse, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordByNameResponse, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesResponse, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdResponse, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersResponse, TPushTxResponse } from "./full_node/index";
4
- export { chia_full_node_service, TGetAdditionsAndRemovalsRequest, TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsRequest, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsRequest, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightRequest, TGetBlockRecordByHeightResponse, TGetBlockRecordRequest, TGetBlockRecordResponse, TGetBlockRecordsRequest, TGetBlockRecordsResponse, TGetBlockRequest, TGetBlockResponse, TGetBlockchainStateRequest, TGetBlockchainStateResponse, TGetBlocksRequest, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandRequest, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordByNameRequest, TGetCoinRecordByNameResponse, TGetCoinRecordsByPuzzleHashRequest, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesRequest, TGetCoinRecordsByPuzzleHashesResponse, TGetInitialFreezePeriodRequestOfFullNode, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdRequest, TGetMempoolItemByTxIdResponse, TGetNetworkInfoRequestOfFullNode, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceRequest, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersRequest, TGetUnfinishedBlockHeadersResponse, TPushTxRequest, TPushTxResponse, get_additions_and_removals, get_all_mempool_items, get_all_mempool_tx_ids, get_block, get_block_record, get_block_record_by_height, get_block_records, get_blockchain_state, get_blocks, get_block_count_metrics, get_recent_signage_point_or_eos, get_coin_record_by_name, get_coin_records_by_puzzle_hash, get_coin_records_by_puzzle_hashes, get_initial_freeze_period_of_full_node, get_mempool_item_by_tx_id, get_network_info_of_full_node, get_network_space, get_unfinished_block_headers, push_tx, } from "./full_node/index";
3
+ import type { TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightResponse, TGetBlockRecordResponse, TGetBlockRecordsResponse, TGetBlockResponse, TGetBlockchainStateResponse, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordByNameResponse, TGetCoinRecordsByNamesResponse, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesResponse, TGetCoinRecordsByParentIdsResponse, TGetCoinRecordsByHintResponse, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdResponse, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersResponse, TPushTxResponse } from "./full_node/index";
4
+ export { chia_full_node_service, TGetAdditionsAndRemovalsRequest, TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsRequest, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsRequest, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightRequest, TGetBlockRecordByHeightResponse, TGetBlockRecordRequest, TGetBlockRecordResponse, TGetBlockRecordsRequest, TGetBlockRecordsResponse, TGetBlockRequest, TGetBlockResponse, TGetBlockchainStateRequest, TGetBlockchainStateResponse, TGetBlocksRequest, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandRequest, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordsByNamesRequest, TGetCoinRecordsByNamesResponse, TGetCoinRecordByNameRequest, TGetCoinRecordByNameResponse, TGetCoinRecordsByPuzzleHashRequest, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesRequest, TGetCoinRecordsByPuzzleHashesResponse, TGetCoinRecordsByParentIdsRequest, TGetCoinRecordsByParentIdsResponse, TGetCoinRecordsByHintRequest, TGetCoinRecordsByHintResponse, TGetInitialFreezePeriodRequestOfFullNode, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdRequest, TGetMempoolItemByTxIdResponse, TGetNetworkInfoRequestOfFullNode, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceRequest, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersRequest, TGetUnfinishedBlockHeadersResponse, TPushTxRequest, TPushTxResponse, get_additions_and_removals, get_all_mempool_items, get_all_mempool_tx_ids, get_block, get_block_record, get_block_record_by_height, get_block_records, get_blockchain_state, get_blocks, get_block_count_metrics, get_recent_signage_point_or_eos, get_coin_record_by_name, get_coin_records_by_names, get_coin_records_by_puzzle_hash, get_coin_records_by_puzzle_hashes, get_coin_records_by_parent_ids, get_coin_records_by_hint, get_initial_freeze_period_of_full_node, get_mempool_item_by_tx_id, get_network_info_of_full_node, get_network_space, get_unfinished_block_headers, push_tx, } from "./full_node/index";
5
5
  import type { TAddPlotDirectoryResponse, TDeletePlotResponse, TGetPlotDirectoriesResponse, TGetPlotsResponse, TRefreshPlotsResponse, TRemovePlotDirectoryResponse } from "./harvester/index";
6
6
  export { chia_harvester_service, TAddPlotDirectoryRequest, TAddPlotDirectoryResponse, TDeletePlotRequest, TDeletePlotResponse, TGetPlotDirectoriesRequest, TGetPlotDirectoriesResponse, TGetPlotsRequest, TGetPlotsResponse, TRefreshPlotsRequest, TRefreshPlotsResponse, TRemovePlotDirectoryRequest, TRemovePlotDirectoryResponse, add_plot_directory, delete_plot, get_plot_directories, get_plots, refresh_plots, remove_plot_directory, } from "./harvester/index";
7
- import type { TAddKeyResponse, TAddRateLimitedFundsResponse, TCancelOfferResponse, TCatGetAssetIdResponse, TCatGetNameResponse, TCatAssetIdToNameResponse, TCatSetNameResponse, TCatSpendResponse, TCheckOfferValidityResponse, TCreateNewWalletResponse, TCreateOfferForIdsResponse, TCreateSignedTransactionResponse, TDeleteAllKeysResponse, TDeleteKeyResponse, TDidCreateAttestResponse, TDidCreateBackupFileResponse, TDidGetDidResponse, TDidGetInformationNeededForRecoveryResponse, TDidGetPubkeyResponse, TDidGetRecoveryListResponse, TDidRecoverySpendResponse, TDidSpendResponse, TDidUpdateRecoveryIdsResponse, TFarmBlockResponse, TGenerateMnemonicResponse, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountResponse, TGetHeightInfoResponse, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetNetworkInfoResponseOfWallet, TGetNextAddressResponse, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryResponse, TGetPrivateKeyResponse, TGetPublicKeysResponse, TGetSyncStatusResponse, TGetTransactionCountResponse, TGetTransactionResponse, TGetTransactionsResponse, TGetWalletBalanceResponse, TGetWalletsResponse, TLoginResponse, TPushTxResponse as TPushTxResponseOfWallet, TPwAbsorbRewardsResponse, TPwStatusResponse, TRlSetUserInfoResponse, TSendClawbackTransactionResponse, TSendTransactionResponse, TSendTransactionMultiResponse, TTakeOfferResponse, TPwJoinPoolResponse, TPwSelfPoolResponse } from "./wallet/index";
8
- export { chia_wallet_service, TAddKeyRequest, TAddKeyResponse, TAddRateLimitedFundsRequest, TAddRateLimitedFundsResponse, TAdditions, TCancelOfferRequest, TCancelOfferResponse, TCatGetAssetIdRequest, TCatGetAssetIdResponse, TCatGetNameRequest, TCatGetNameResponse, TCatAssetIdToNameRequest, TCatAssetIdToNameResponse, TCatSetNameRequest, TCatSetNameResponse, TCatSpendRequest, TCatSpendResponse, TCheckOfferValidityRequest, TCheckOfferValidityResponse, TCreateNewWalletRequest, TCreateNewWalletResponse, TCreateOfferForIdsRequest, TCreateOfferForIdsResponse, TCreateSignedTransactionRequest, TCreateSignedTransactionResponse, TCreate_New_CAT_WalletRequest, TCreate_New_CAT_WalletResponse, TCreate_New_DID_WalletRequest, TCreate_New_DID_WalletResponse, TCreate_New_RL_WalletRequest, TCreate_New_RL_WalletResponse, TDeleteAllKeysRequest, TDeleteAllKeysResponse, TDeleteKeyRequest, TDeleteKeyResponse, TDidCreateAttestRequest, TDidCreateAttestResponse, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, TDidGetDidRequest, TDidGetDidResponse, TDidGetInformationNeededForRecoveryRequest, TDidGetInformationNeededForRecoveryResponse, TDidGetPubkeyRequest, TDidGetPubkeyResponse, TDidGetRecoveryListRequest, TDidGetRecoveryListResponse, TDidRecoverySpendRequest, TDidRecoverySpendResponse, TDidSpendRequest, TDidSpendResponse, TDidUpdateRecoveryIdsRequest, TDidUpdateRecoveryIdsResponse, TFarmBlockRequest, TFarmBlockResponse, TGenerateMnemonicRequest, TGenerateMnemonicResponse, TGetAllOffersRequest, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountRequest, TGetFarmedAmountResponse, TGetHeightInfoRequest, TGetHeightInfoResponse, TGetInitialFreezePeriodRequestOfWallet, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetOfferRequest, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryRequest, TGetOfferSummaryResponse, TGetNetworkInfoRequestOfWallet, TGetNetworkInfoResponseOfWallet, TGetNextAddressRequest, TGetNextAddressResponse, TGetPrivateKeyRequest, TGetPrivateKeyResponse, TGetPublicKeysRequest, TGetPublicKeysResponse, TGetSyncStatusRequest, TGetSyncStatusResponse, TGetTransactionCountRequest, TGetTransactionCountResponse, TGetTransactionRequest, TGetTransactionResponse, TGetTransactionsRequest, TGetTransactionsResponse, TGetWalletBalanceRequest, TGetWalletBalanceResponse, TGetWalletsRequest, TGetWalletsResponse, TLoginRequest, TLoginResponse, TPushTxRequest as TPushTxRequestOfWallet, TPushTxResponse as TPushTxResponseOfWallet, TPwJoinPoolRequest, TPwJoinPoolResponse, TPwSelfPoolRequest, TPwSelfPoolResponse, TPwAbsorbRewardsRequest, TPwAbsorbRewardsResponse, TPwStatusRequest, TPwStatusResponse, TRlSetUserInfoRequest, TRlSetUserInfoResponse, TSendClawbackTransactionRequest, TSendClawbackTransactionResponse, TSendTransactionRequest, TSendTransactionResponse, TSendTransactionMultiRequest, TSendTransactionMultiResponse, TTakeOfferRequest, TTakeOfferResponse, add_key, add_rate_limited_funds, cancel_offer, cat_get_asset_id, cat_get_name, cat_asset_id_to_name, cat_set_name, cat_spend, check_offer_validity, create_new_wallet, create_offer_for_ids, create_signed_transaction, delete_all_keys, delete_key, did_create_attest, did_create_backup_file, did_get_did, did_get_information_needed_for_recovery, did_get_pubkey, did_get_recovery_list, did_recovery_spend, did_spend, did_update_recovery_ids, farm_block, generate_mnemonic, get_all_offers, get_cat_list, get_farmed_amount, get_height_info, get_initial_freeze_period_of_wallet, get_logged_in_fingerprint, get_offer, get_offers_count, get_offer_summary, get_network_info_of_wallet, get_next_address, get_private_key, get_public_keys, get_sync_status, get_transaction, get_transaction_count, get_transactions, get_wallet_balance, get_wallets, log_in, push_tx as push_tx_wallet, pw_join_pool, pw_self_pool, pw_absorb_rewards, pw_status, rl_set_user_info, send_clawback_transaction, send_transaction, send_transaction_multi, take_offer, } from "./wallet/index";
7
+ import type { TAddKeyResponse, TAddRateLimitedFundsResponse, TCancelOfferResponse, TCatGetAssetIdResponse, TCatGetNameResponse, TGetStrayCatsResponse, TCatAssetIdToNameResponse, TCatSetNameResponse, TCatSpendResponse, TCheckOfferValidityResponse, TCreateNewWalletResponse, TCreateOfferForIdsResponse, TCreateSignedTransactionResponse, TDeleteUnconfirmedTransactionsResponse, TSelectCoinsResponse, TDeleteAllKeysResponse, TDeleteKeyResponse, TDidCreateAttestResponse, TDidCreateBackupFileResponse, TDidGetDidResponse, TDidGetInformationNeededForRecoveryResponse, TDidGetPubkeyResponse, TDidGetRecoveryListResponse, TDidRecoverySpendResponse, TDidSpendResponse, TDidUpdateRecoveryIdsResponse, TFarmBlockResponse, TGenerateMnemonicResponse, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountResponse, TGetHeightInfoResponse, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetNetworkInfoResponseOfWallet, TGetNextAddressResponse, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryResponse, TGetPrivateKeyResponse, TGetPublicKeysResponse, TGetSyncStatusResponse, TGetTransactionCountResponse, TGetTransactionResponse, TGetTransactionsResponse, TGetWalletBalanceResponse, TGetWalletsResponse, TLoginResponse, TPushTxResponse as TPushTxResponseOfWallet, TPwAbsorbRewardsResponse, TPwStatusResponse, TRlSetUserInfoResponse, TSendClawbackTransactionResponse, TSendTransactionResponse, TSendTransactionMultiResponse, TTakeOfferResponse, TPwJoinPoolResponse, TPwSelfPoolResponse } from "./wallet/index";
8
+ export { chia_wallet_service, TAddKeyRequest, TAddKeyResponse, TAddRateLimitedFundsRequest, TAddRateLimitedFundsResponse, TAdditions, TCancelOfferRequest, TCancelOfferResponse, TCatGetAssetIdRequest, TCatGetAssetIdResponse, TCatGetNameRequest, TCatGetNameResponse, TGetStrayCatsResponse, TCatAssetIdToNameRequest, TCatAssetIdToNameResponse, TCatSetNameRequest, TCatSetNameResponse, TCatSpendRequest, TCatSpendResponse, TCheckOfferValidityRequest, TCheckOfferValidityResponse, TCreateNewWalletRequest, TCreateNewWalletResponse, TCreateOfferForIdsRequest, TCreateOfferForIdsResponse, TCreateSignedTransactionRequest, TCreateSignedTransactionResponse, TDeleteUnconfirmedTransactionsRequest, TDeleteUnconfirmedTransactionsResponse, TSelectCoinsRequest, TSelectCoinsResponse, TCreate_New_CAT_WalletRequest, TCreate_New_CAT_WalletResponse, TCreate_New_DID_WalletRequest, TCreate_New_DID_WalletResponse, TCreate_New_RL_WalletRequest, TCreate_New_RL_WalletResponse, TDeleteAllKeysRequest, TDeleteAllKeysResponse, TDeleteKeyRequest, TDeleteKeyResponse, TDidCreateAttestRequest, TDidCreateAttestResponse, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, TDidGetDidRequest, TDidGetDidResponse, TDidGetInformationNeededForRecoveryRequest, TDidGetInformationNeededForRecoveryResponse, TDidGetPubkeyRequest, TDidGetPubkeyResponse, TDidGetRecoveryListRequest, TDidGetRecoveryListResponse, TDidRecoverySpendRequest, TDidRecoverySpendResponse, TDidSpendRequest, TDidSpendResponse, TDidUpdateRecoveryIdsRequest, TDidUpdateRecoveryIdsResponse, TFarmBlockRequest, TFarmBlockResponse, TGenerateMnemonicRequest, TGenerateMnemonicResponse, TGetAllOffersRequest, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountRequest, TGetFarmedAmountResponse, TGetHeightInfoRequest, TGetHeightInfoResponse, TGetInitialFreezePeriodRequestOfWallet, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetOfferRequest, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryRequest, TGetOfferSummaryResponse, TGetNetworkInfoRequestOfWallet, TGetNetworkInfoResponseOfWallet, TGetNextAddressRequest, TGetNextAddressResponse, TGetPrivateKeyRequest, TGetPrivateKeyResponse, TGetPublicKeysRequest, TGetPublicKeysResponse, TGetSyncStatusRequest, TGetSyncStatusResponse, TGetTransactionCountRequest, TGetTransactionCountResponse, TGetTransactionRequest, TGetTransactionResponse, TGetTransactionsRequest, TGetTransactionsResponse, TGetWalletBalanceRequest, TGetWalletBalanceResponse, TGetWalletsRequest, TGetWalletsResponse, TLoginRequest, TLoginResponse, TPushTxRequest as TPushTxRequestOfWallet, TPushTxResponse as TPushTxResponseOfWallet, TPwJoinPoolRequest, TPwJoinPoolResponse, TPwSelfPoolRequest, TPwSelfPoolResponse, TPwAbsorbRewardsRequest, TPwAbsorbRewardsResponse, TPwStatusRequest, TPwStatusResponse, TRlSetUserInfoRequest, TRlSetUserInfoResponse, TSendClawbackTransactionRequest, TSendClawbackTransactionResponse, TSendTransactionRequest, TSendTransactionResponse, TSendTransactionMultiRequest, TSendTransactionMultiResponse, TTakeOfferRequest, TTakeOfferResponse, add_key, add_rate_limited_funds, cancel_offer, cat_get_asset_id, cat_get_name, get_stray_cats, cat_asset_id_to_name, cat_set_name, cat_spend, check_offer_validity, create_new_wallet, create_offer_for_ids, create_signed_transaction, delete_unconfirmed_transactions, select_coins, delete_all_keys, delete_key, did_create_attest, did_create_backup_file, did_get_did, did_get_information_needed_for_recovery, did_get_pubkey, did_get_recovery_list, did_recovery_spend, did_spend, did_update_recovery_ids, farm_block, generate_mnemonic, get_all_offers, get_cat_list, get_farmed_amount, get_height_info, get_initial_freeze_period_of_wallet, get_logged_in_fingerprint, get_offer, get_offers_count, get_offer_summary, get_network_info_of_wallet, get_next_address, get_private_key, get_public_keys, get_sync_status, get_transaction, get_transaction_count, get_transactions, get_wallet_balance, get_wallets, log_in, push_tx as push_tx_wallet, pw_join_pool, pw_self_pool, pw_absorb_rewards, pw_status, rl_set_user_info, send_clawback_transaction, send_transaction, send_transaction_multi, take_offer, } from "./wallet/index";
9
9
  import type { TGetIpsAfterTimestampResponse, TGetPeerCountsResponse } from "./crawler/index";
10
10
  export { chia_crawler_service, TGetIpsAfterTimestampRequest, TGetIpsAfterTimestampResponse, TGetPeerCountsResponse, get_ips_after_timestamp, get_peer_counts, } from "./crawler/index";
11
11
  import type { TGetConnectionsResponse, TOpenConnectionResponse, TCloseConnectionResponse, TStopNodeResponse, TGetRoutesResponse } from "./common/index";
12
12
  export { chia_common_service, TGetConnectionsRequest, TGetConnectionsResponse, TOpenConnectionRequest, TOpenConnectionResponse, TCloseConnectionRequest, TCloseConnectionResponse, TStopNodeResponse, TGetRoutesResponse, get_connections, open_connection, close_connection, stop_node, get_routes, } from "./common/index";
13
13
  export declare type RpcFarmerMessage = TGetRewardTargetResponse | TGetSignagePointResponse | TGetSignagePointsResponse | TSetRewardTargetResponse | TGetHarvestersResponse | TSetPayoutInstructionsResponse | TGetPoolStateResponse;
14
- export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse;
14
+ export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse;
15
15
  export declare type RpcHarvesterMessage = TAddPlotDirectoryResponse | TDeletePlotResponse | TGetPlotDirectoriesResponse | TGetPlotsResponse | TRefreshPlotsResponse | TRemovePlotDirectoryResponse;
16
- export declare type RpcWalletMessage = TAddKeyResponse | TAddRateLimitedFundsResponse | TCancelOfferResponse | TCatGetAssetIdResponse | TCatGetNameResponse | TCatAssetIdToNameResponse | TCatSetNameResponse | TCatSpendResponse | TCheckOfferValidityResponse | TCreateNewWalletResponse | TCreateOfferForIdsResponse | TCreateSignedTransactionResponse | TDeleteAllKeysResponse | TDeleteKeyResponse | TDidCreateAttestResponse | TDidCreateBackupFileResponse | TDidGetDidResponse | TDidGetInformationNeededForRecoveryResponse | TDidGetPubkeyResponse | TDidGetRecoveryListResponse | TDidRecoverySpendResponse | TDidSpendResponse | TDidUpdateRecoveryIdsResponse | TFarmBlockResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | TGetNetworkInfoResponseOfWallet | TGetNextAddressResponse | TGetPrivateKeyResponse | TGetPublicKeysResponse | TGetSyncStatusResponse | TGetTransactionResponse | TGetTransactionCountResponse | TGetTransactionsResponse | TGetWalletBalanceResponse | TGetWalletsResponse | TLoginResponse | TPushTxResponseOfWallet | TPwJoinPoolResponse | TPwSelfPoolResponse | TPwAbsorbRewardsResponse | TPwStatusResponse | TRlSetUserInfoResponse | TSendClawbackTransactionResponse | TSendTransactionResponse | TSendTransactionMultiResponse | TTakeOfferResponse;
16
+ export declare type RpcWalletMessage = TAddKeyResponse | TAddRateLimitedFundsResponse | TCancelOfferResponse | TCatGetAssetIdResponse | TCatGetNameResponse | TGetStrayCatsResponse | TCatAssetIdToNameResponse | TCatSetNameResponse | TCatSpendResponse | TCheckOfferValidityResponse | TCreateNewWalletResponse | TCreateOfferForIdsResponse | TCreateSignedTransactionResponse | TDeleteUnconfirmedTransactionsResponse | TSelectCoinsResponse | TDeleteAllKeysResponse | TDeleteKeyResponse | TDidCreateAttestResponse | TDidCreateBackupFileResponse | TDidGetDidResponse | TDidGetInformationNeededForRecoveryResponse | TDidGetPubkeyResponse | TDidGetRecoveryListResponse | TDidRecoverySpendResponse | TDidSpendResponse | TDidUpdateRecoveryIdsResponse | TFarmBlockResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | TGetNetworkInfoResponseOfWallet | TGetNextAddressResponse | TGetPrivateKeyResponse | TGetPublicKeysResponse | TGetSyncStatusResponse | TGetTransactionResponse | TGetTransactionCountResponse | TGetTransactionsResponse | TGetWalletBalanceResponse | TGetWalletsResponse | TLoginResponse | TPushTxResponseOfWallet | TPwJoinPoolResponse | TPwSelfPoolResponse | TPwAbsorbRewardsResponse | TPwStatusResponse | TRlSetUserInfoResponse | TSendClawbackTransactionResponse | TSendTransactionResponse | TSendTransactionMultiResponse | TTakeOfferResponse;
17
17
  export declare type RpcCrawlerMessage = TGetIpsAfterTimestampResponse | TGetPeerCountsResponse;
18
18
  export declare type RpcCommonMessage = TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse;
19
19
  export declare type RpcMessage = RpcFarmerMessage | RpcFullNodeMessage | RpcHarvesterMessage | RpcWalletMessage | RpcCrawlerMessage | RpcCommonMessage;
package/api/rpc/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.delete_all_keys = exports.create_signed_transaction = exports.create_offer_for_ids = exports.create_new_wallet = exports.check_offer_validity = exports.cat_spend = exports.cat_set_name = exports.cat_asset_id_to_name = exports.cat_get_name = exports.cat_get_asset_id = exports.cancel_offer = exports.add_rate_limited_funds = exports.add_key = exports.chia_wallet_service = exports.remove_plot_directory = exports.refresh_plots = exports.get_plots = exports.get_plot_directories = exports.delete_plot = exports.add_plot_directory = exports.chia_harvester_service = exports.push_tx = exports.get_unfinished_block_headers = exports.get_network_space = exports.get_network_info_of_full_node = exports.get_mempool_item_by_tx_id = exports.get_initial_freeze_period_of_full_node = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hash = exports.get_coin_record_by_name = exports.get_recent_signage_point_or_eos = exports.get_block_count_metrics = exports.get_blocks = exports.get_blockchain_state = exports.get_block_records = exports.get_block_record_by_height = exports.get_block_record = exports.get_block = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_additions_and_removals = exports.chia_full_node_service = exports.get_pool_state = exports.set_pool_payout_instructions = exports.get_harvesters = exports.set_reward_targets = exports.get_signage_points = exports.get_signage_point = exports.get_reward_targets = exports.chia_farmer_service = void 0;
4
- exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.chia_common_service = exports.get_peer_counts = exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.take_offer = exports.send_transaction_multi = exports.send_transaction = exports.send_clawback_transaction = exports.rl_set_user_info = exports.pw_status = exports.pw_absorb_rewards = exports.pw_self_pool = exports.pw_join_pool = exports.push_tx_wallet = exports.log_in = exports.get_wallets = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction_count = exports.get_transaction = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = exports.get_next_address = exports.get_network_info_of_wallet = exports.get_offer_summary = exports.get_offers_count = exports.get_offer = exports.get_logged_in_fingerprint = exports.get_initial_freeze_period_of_wallet = exports.get_height_info = exports.get_farmed_amount = exports.get_cat_list = exports.get_all_offers = exports.generate_mnemonic = exports.farm_block = exports.did_update_recovery_ids = exports.did_spend = exports.did_recovery_spend = exports.did_get_recovery_list = exports.did_get_pubkey = exports.did_get_information_needed_for_recovery = exports.did_get_did = exports.did_create_backup_file = exports.did_create_attest = exports.delete_key = void 0;
5
- exports.get_routes = void 0;
3
+ exports.check_offer_validity = exports.cat_spend = exports.cat_set_name = exports.cat_asset_id_to_name = exports.get_stray_cats = exports.cat_get_name = exports.cat_get_asset_id = exports.cancel_offer = exports.add_rate_limited_funds = exports.add_key = exports.chia_wallet_service = exports.remove_plot_directory = exports.refresh_plots = exports.get_plots = exports.get_plot_directories = exports.delete_plot = exports.add_plot_directory = exports.chia_harvester_service = exports.push_tx = exports.get_unfinished_block_headers = exports.get_network_space = exports.get_network_info_of_full_node = exports.get_mempool_item_by_tx_id = exports.get_initial_freeze_period_of_full_node = exports.get_coin_records_by_hint = exports.get_coin_records_by_parent_ids = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hash = exports.get_coin_records_by_names = exports.get_coin_record_by_name = exports.get_recent_signage_point_or_eos = exports.get_block_count_metrics = exports.get_blocks = exports.get_blockchain_state = exports.get_block_records = exports.get_block_record_by_height = exports.get_block_record = exports.get_block = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_additions_and_removals = exports.chia_full_node_service = exports.get_pool_state = exports.set_pool_payout_instructions = exports.get_harvesters = exports.set_reward_targets = exports.get_signage_points = exports.get_signage_point = exports.get_reward_targets = exports.chia_farmer_service = void 0;
4
+ exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.take_offer = exports.send_transaction_multi = exports.send_transaction = exports.send_clawback_transaction = exports.rl_set_user_info = exports.pw_status = exports.pw_absorb_rewards = exports.pw_self_pool = exports.pw_join_pool = exports.push_tx_wallet = exports.log_in = exports.get_wallets = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction_count = exports.get_transaction = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = exports.get_next_address = exports.get_network_info_of_wallet = exports.get_offer_summary = exports.get_offers_count = exports.get_offer = exports.get_logged_in_fingerprint = exports.get_initial_freeze_period_of_wallet = exports.get_height_info = exports.get_farmed_amount = exports.get_cat_list = exports.get_all_offers = exports.generate_mnemonic = exports.farm_block = exports.did_update_recovery_ids = exports.did_spend = exports.did_recovery_spend = exports.did_get_recovery_list = exports.did_get_pubkey = exports.did_get_information_needed_for_recovery = exports.did_get_did = exports.did_create_backup_file = exports.did_create_attest = exports.delete_key = exports.delete_all_keys = exports.select_coins = exports.delete_unconfirmed_transactions = exports.create_signed_transaction = exports.create_offer_for_ids = exports.create_new_wallet = void 0;
5
+ exports.get_routes = exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.chia_common_service = exports.get_peer_counts = void 0;
6
6
  var index_1 = require("./farmer/index");
7
7
  Object.defineProperty(exports, "chia_farmer_service", { enumerable: true, get: function () { return index_1.chia_farmer_service; } });
8
8
  Object.defineProperty(exports, "get_reward_targets", { enumerable: true, get: function () { return index_1.get_reward_targets; } });
@@ -26,8 +26,11 @@ Object.defineProperty(exports, "get_blocks", { enumerable: true, get: function (
26
26
  Object.defineProperty(exports, "get_block_count_metrics", { enumerable: true, get: function () { return index_2.get_block_count_metrics; } });
27
27
  Object.defineProperty(exports, "get_recent_signage_point_or_eos", { enumerable: true, get: function () { return index_2.get_recent_signage_point_or_eos; } });
28
28
  Object.defineProperty(exports, "get_coin_record_by_name", { enumerable: true, get: function () { return index_2.get_coin_record_by_name; } });
29
+ Object.defineProperty(exports, "get_coin_records_by_names", { enumerable: true, get: function () { return index_2.get_coin_records_by_names; } });
29
30
  Object.defineProperty(exports, "get_coin_records_by_puzzle_hash", { enumerable: true, get: function () { return index_2.get_coin_records_by_puzzle_hash; } });
30
31
  Object.defineProperty(exports, "get_coin_records_by_puzzle_hashes", { enumerable: true, get: function () { return index_2.get_coin_records_by_puzzle_hashes; } });
32
+ Object.defineProperty(exports, "get_coin_records_by_parent_ids", { enumerable: true, get: function () { return index_2.get_coin_records_by_parent_ids; } });
33
+ Object.defineProperty(exports, "get_coin_records_by_hint", { enumerable: true, get: function () { return index_2.get_coin_records_by_hint; } });
31
34
  Object.defineProperty(exports, "get_initial_freeze_period_of_full_node", { enumerable: true, get: function () { return index_2.get_initial_freeze_period_of_full_node; } });
32
35
  Object.defineProperty(exports, "get_mempool_item_by_tx_id", { enumerable: true, get: function () { return index_2.get_mempool_item_by_tx_id; } });
33
36
  Object.defineProperty(exports, "get_network_info_of_full_node", { enumerable: true, get: function () { return index_2.get_network_info_of_full_node; } });
@@ -49,6 +52,7 @@ Object.defineProperty(exports, "add_rate_limited_funds", { enumerable: true, get
49
52
  Object.defineProperty(exports, "cancel_offer", { enumerable: true, get: function () { return index_4.cancel_offer; } });
50
53
  Object.defineProperty(exports, "cat_get_asset_id", { enumerable: true, get: function () { return index_4.cat_get_asset_id; } });
51
54
  Object.defineProperty(exports, "cat_get_name", { enumerable: true, get: function () { return index_4.cat_get_name; } });
55
+ Object.defineProperty(exports, "get_stray_cats", { enumerable: true, get: function () { return index_4.get_stray_cats; } });
52
56
  Object.defineProperty(exports, "cat_asset_id_to_name", { enumerable: true, get: function () { return index_4.cat_asset_id_to_name; } });
53
57
  Object.defineProperty(exports, "cat_set_name", { enumerable: true, get: function () { return index_4.cat_set_name; } });
54
58
  Object.defineProperty(exports, "cat_spend", { enumerable: true, get: function () { return index_4.cat_spend; } });
@@ -56,6 +60,8 @@ Object.defineProperty(exports, "check_offer_validity", { enumerable: true, get:
56
60
  Object.defineProperty(exports, "create_new_wallet", { enumerable: true, get: function () { return index_4.create_new_wallet; } });
57
61
  Object.defineProperty(exports, "create_offer_for_ids", { enumerable: true, get: function () { return index_4.create_offer_for_ids; } });
58
62
  Object.defineProperty(exports, "create_signed_transaction", { enumerable: true, get: function () { return index_4.create_signed_transaction; } });
63
+ Object.defineProperty(exports, "delete_unconfirmed_transactions", { enumerable: true, get: function () { return index_4.delete_unconfirmed_transactions; } });
64
+ Object.defineProperty(exports, "select_coins", { enumerable: true, get: function () { return index_4.select_coins; } });
59
65
  Object.defineProperty(exports, "delete_all_keys", { enumerable: true, get: function () { return index_4.delete_all_keys; } });
60
66
  Object.defineProperty(exports, "delete_key", { enumerable: true, get: function () { return index_4.delete_key; } });
61
67
  Object.defineProperty(exports, "did_create_attest", { enumerable: true, get: function () { return index_4.did_create_attest; } });
@@ -152,11 +152,13 @@ export declare type TGetNetworkInfoResponseOfWallet = {
152
152
  export declare function get_network_info_of_wallet(agent: TRPCAgent): Promise<TGetNetworkInfoResponseOfWallet>;
153
153
  export declare const get_wallets_command = "get_wallets";
154
154
  export declare type get_wallets_command = typeof get_wallets_command;
155
- export declare type TGetWalletsRequest = {};
155
+ export declare type TGetWalletsRequest = {
156
+ type?: int;
157
+ };
156
158
  export declare type TGetWalletsResponse = {
157
159
  wallets: WalletInfo[];
158
160
  };
159
- export declare function get_wallets(agent: TRPCAgent): Promise<TGetWalletsResponse>;
161
+ export declare function get_wallets(agent: TRPCAgent, data: TGetWalletsRequest): Promise<TGetWalletsResponse>;
160
162
  export declare type TCreate_New_CAT_WalletRequest = {
161
163
  fee?: uint64;
162
164
  wallet_type: "cat_wallet";
@@ -397,6 +399,16 @@ export declare type TDeleteUnconfirmedTransactionsRequest = {
397
399
  };
398
400
  export declare type TDeleteUnconfirmedTransactionsResponse = {};
399
401
  export declare function delete_unconfirmed_transactions(agent: TRPCAgent, data: TDeleteUnconfirmedTransactionsRequest): Promise<TDeleteUnconfirmedTransactionsResponse>;
402
+ export declare const select_coins_command = "select_coins";
403
+ export declare type select_coins_command = typeof select_coins_command;
404
+ export declare type TSelectCoinsRequest = {
405
+ amount: uint64;
406
+ wallet_id: uint32;
407
+ };
408
+ export declare type TSelectCoinsResponse = {
409
+ coins: Coin[];
410
+ };
411
+ export declare function select_coins(agent: TRPCAgent, data: TSelectCoinsRequest): Promise<TSelectCoinsResponse>;
400
412
  export declare const cat_set_name_command = "cat_set_name";
401
413
  export declare type cat_set_name_command = typeof cat_set_name_command;
402
414
  export declare type TCatSetNameRequest = {
@@ -427,6 +439,17 @@ export declare type TCatGetNameResponse = {
427
439
  name: str;
428
440
  };
429
441
  export declare function cat_get_name(agent: TRPCAgent, data: TCatGetNameRequest): Promise<TCatGetNameResponse>;
442
+ export declare const get_stray_cats_command = "get_stray_cats";
443
+ export declare type get_stray_cats_command = typeof get_stray_cats_command;
444
+ export declare type TGetStrayCatsResponse = {
445
+ stray_cats: Array<{
446
+ asset_id: str;
447
+ name: str;
448
+ first_seen_height: int;
449
+ sender_puzzle_hash: str;
450
+ }>;
451
+ };
452
+ export declare function get_stray_cats(agent: TRPCAgent): Promise<TGetStrayCatsResponse>;
430
453
  export declare const cat_spend_command = "cat_spend";
431
454
  export declare type cat_spend_command = typeof cat_spend_command;
432
455
  export declare type TCatSpendRequest = {
@@ -730,6 +753,7 @@ export declare type pw_absorb_rewards_command = typeof pw_absorb_rewards_command
730
753
  export declare type TPwAbsorbRewardsRequest = {
731
754
  wallet_id: uint32;
732
755
  fee?: uint64;
756
+ max_spends_in_tx?: int;
733
757
  };
734
758
  export declare type TPwAbsorbRewardsResponse = {
735
759
  state: PoolWalletInfo;
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.get_farmed_amount_command = exports.get_transaction_count = exports.get_transaction_count_command = exports.send_transaction_multi = exports.send_transaction_multi_command = exports.send_transaction = exports.send_transaction_command = exports.get_next_address = exports.get_next_address_command = exports.get_transactions = exports.get_transactions_command = exports.get_transaction = exports.get_transaction_command = exports.get_wallet_balance = exports.get_wallet_balance_command = exports.create_new_wallet = exports.create_new_wallet_command = exports.get_wallets = exports.get_wallets_command = exports.get_network_info_of_wallet = exports.get_network_info_command_of_wallet = exports.get_initial_freeze_period_of_wallet = exports.get_initial_freeze_period_command_of_wallet = exports.farm_block = exports.farm_block_command = exports.push_tx = exports.push_tx_command = exports.get_height_info = exports.get_height_info_command = exports.get_sync_status = exports.get_sync_status_command = exports.delete_all_keys = exports.delete_all_keys_command = exports.check_delete_key = exports.check_delete_key_command = exports.delete_key = exports.delete_key_command = exports.add_key = exports.add_key_command = exports.generate_mnemonic = exports.generate_mnemonic_command = exports.get_private_key = exports.get_private_key_command = exports.get_public_keys = exports.get_public_keys_command = exports.get_logged_in_fingerprint = exports.get_logged_in_fingerprint_command = exports.log_in = exports.log_in_command = exports.chia_wallet_service = void 0;
13
- exports.did_create_backup_file_command = exports.did_get_information_needed_for_recovery = exports.did_get_information_needed_for_recovery_command = exports.did_create_attest = exports.did_create_attest_command = exports.did_get_recovery_list = exports.did_get_recovery_list_command = exports.did_recovery_spend = exports.did_recovery_spend_command = exports.did_get_did = exports.did_get_did_command = exports.did_get_pubkey = exports.did_get_pubkey_command = exports.did_spend = exports.did_spend_command = exports.did_update_recovery_ids = exports.did_update_recovery_ids_command = exports.get_cat_list = exports.get_cat_list_command = exports.cancel_offer = exports.cancel_offer_command = exports.get_offers_count = exports.get_offers_count_command = exports.get_all_offers = exports.get_all_offers_command = exports.get_offer = exports.get_offer_command = exports.take_offer = exports.take_offer_command = exports.check_offer_validity = exports.check_offer_validity_command = exports.get_offer_summary = exports.get_offer_summary_command = exports.create_offer_for_ids = exports.create_offer_for_ids_command = exports.cat_get_asset_id = exports.cat_get_asset_id_command = exports.cat_spend = exports.cat_spend_command = exports.cat_get_name = exports.cat_get_name_command = exports.cat_asset_id_to_name = exports.cat_asset_id_to_name_command = exports.cat_set_name = exports.cat_set_name_command = exports.delete_unconfirmed_transactions = exports.delete_unconfirmed_transactions_command = exports.create_signed_transaction = exports.create_signed_transaction_command = exports.get_farmed_amount = void 0;
14
- exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = exports.pw_self_pool_command = exports.pw_join_pool = exports.pw_join_pool_command = exports.add_rate_limited_funds = exports.add_rate_limited_funds_command = exports.send_clawback_transaction = exports.send_clawback_transaction_command = exports.rl_set_user_info = exports.rl_set_user_info_command = exports.did_create_backup_file = void 0;
13
+ exports.did_create_attest_command = exports.did_get_recovery_list = exports.did_get_recovery_list_command = exports.did_recovery_spend = exports.did_recovery_spend_command = exports.did_get_did = exports.did_get_did_command = exports.did_get_pubkey = exports.did_get_pubkey_command = exports.did_spend = exports.did_spend_command = exports.did_update_recovery_ids = exports.did_update_recovery_ids_command = exports.get_cat_list = exports.get_cat_list_command = exports.cancel_offer = exports.cancel_offer_command = exports.get_offers_count = exports.get_offers_count_command = exports.get_all_offers = exports.get_all_offers_command = exports.get_offer = exports.get_offer_command = exports.take_offer = exports.take_offer_command = exports.check_offer_validity = exports.check_offer_validity_command = exports.get_offer_summary = exports.get_offer_summary_command = exports.create_offer_for_ids = exports.create_offer_for_ids_command = exports.cat_get_asset_id = exports.cat_get_asset_id_command = exports.cat_spend = exports.cat_spend_command = exports.get_stray_cats = exports.get_stray_cats_command = exports.cat_get_name = exports.cat_get_name_command = exports.cat_asset_id_to_name = exports.cat_asset_id_to_name_command = exports.cat_set_name = exports.cat_set_name_command = exports.select_coins = exports.select_coins_command = exports.delete_unconfirmed_transactions = exports.delete_unconfirmed_transactions_command = exports.create_signed_transaction = exports.create_signed_transaction_command = exports.get_farmed_amount = void 0;
14
+ exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = exports.pw_self_pool_command = exports.pw_join_pool = exports.pw_join_pool_command = exports.add_rate_limited_funds = exports.add_rate_limited_funds_command = exports.send_clawback_transaction = exports.send_clawback_transaction_command = exports.rl_set_user_info = exports.rl_set_user_info_command = exports.did_create_backup_file = exports.did_create_backup_file_command = exports.did_get_information_needed_for_recovery = exports.did_get_information_needed_for_recovery_command = exports.did_create_attest = void 0;
15
15
  exports.chia_wallet_service = "chia_wallet";
16
16
  // # Key management
17
17
  exports.log_in_command = "log_in";
@@ -122,9 +122,9 @@ function get_network_info_of_wallet(agent) {
122
122
  exports.get_network_info_of_wallet = get_network_info_of_wallet;
123
123
  // # Wallet management
124
124
  exports.get_wallets_command = "get_wallets";
125
- function get_wallets(agent) {
125
+ function get_wallets(agent, data) {
126
126
  return __awaiter(this, void 0, void 0, function* () {
127
- return agent.sendMessage(exports.chia_wallet_service, exports.get_wallets_command);
127
+ return agent.sendMessage(exports.chia_wallet_service, exports.get_wallets_command, data);
128
128
  });
129
129
  }
130
130
  exports.get_wallets = get_wallets;
@@ -206,6 +206,13 @@ function delete_unconfirmed_transactions(agent, data) {
206
206
  });
207
207
  }
208
208
  exports.delete_unconfirmed_transactions = delete_unconfirmed_transactions;
209
+ exports.select_coins_command = "select_coins";
210
+ function select_coins(agent, data) {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ return agent.sendMessage(exports.chia_wallet_service, exports.select_coins_command, data);
213
+ });
214
+ }
215
+ exports.select_coins = select_coins;
209
216
  // # CATs and Trading
210
217
  exports.cat_set_name_command = "cat_set_name";
211
218
  function cat_set_name(agent, data) {
@@ -228,6 +235,13 @@ function cat_get_name(agent, data) {
228
235
  });
229
236
  }
230
237
  exports.cat_get_name = cat_get_name;
238
+ exports.get_stray_cats_command = "get_stray_cats";
239
+ function get_stray_cats(agent) {
240
+ return __awaiter(this, void 0, void 0, function* () {
241
+ return agent.sendMessage(exports.chia_wallet_service, exports.get_stray_cats_command);
242
+ });
243
+ }
244
+ exports.get_stray_cats = get_stray_cats;
231
245
  exports.cat_spend_command = "cat_spend";
232
246
  function cat_spend(agent, data) {
233
247
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chia-agent",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "author": "ChiaMineJP <admin@chiamine.jp>",
5
5
  "description": "chia rpc/websocket client library",
6
6
  "license": "MIT",
@@ -1,20 +0,0 @@
1
- export declare const ConditionOpcodes: {
2
- readonly UNKNOWN: "0";
3
- readonly AGG_SIG_UNSAFE: "1";
4
- readonly AGG_SIG_ME: "2";
5
- readonly CREATE_COIN: "3";
6
- readonly RESERVE_FEE: "4";
7
- readonly CREATE_COIN_ANNOUNCEMENT: "12";
8
- readonly ASSERT_COIN_ANNOUNCEMENT: "13";
9
- readonly CREATE_PUZZLE_ANNOUNCEMENT: "14";
10
- readonly ASSERT_PUZZLE_ANNOUNCEMENT: "15";
11
- readonly ASSERT_MY_COIN_ID: "22";
12
- readonly ASSERT_MY_PARENT_ID: "23";
13
- readonly ASSERT_MY_PUZZLEHASH: "24";
14
- readonly ASSERT_MY_AMOUNT: "25";
15
- readonly ASSERT_SECONDS_RELATIVE: "32";
16
- readonly ASSERT_SECONDS_ABSOLUTE: "33";
17
- readonly ASSERT_HEIGHT_RELATIVE: "34";
18
- readonly ASSERT_HEIGHT_ABSOLUTE: "35";
19
- };
20
- export declare type ConditionOpcode = typeof ConditionOpcodes[keyof typeof ConditionOpcodes];
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConditionOpcodes = void 0;
4
- exports.ConditionOpcodes = {
5
- // # UNKNOWN is ascii "0"
6
- UNKNOWN: "0",
7
- // # AGG_SIG is ascii "1"
8
- // # the conditions below require bls12-381 signatures
9
- AGG_SIG_UNSAFE: "1",
10
- AGG_SIG_ME: "2",
11
- // # the conditions below reserve coin amounts and have to be accounted for in output totals
12
- CREATE_COIN: "3",
13
- RESERVE_FEE: "4",
14
- // # the conditions below deal with announcements, for inter-coin communication
15
- CREATE_COIN_ANNOUNCEMENT: "12",
16
- ASSERT_COIN_ANNOUNCEMENT: "13",
17
- CREATE_PUZZLE_ANNOUNCEMENT: "14",
18
- ASSERT_PUZZLE_ANNOUNCEMENT: "15",
19
- // # the conditions below let coins inquire about themselves
20
- ASSERT_MY_COIN_ID: "22",
21
- ASSERT_MY_PARENT_ID: "23",
22
- ASSERT_MY_PUZZLEHASH: "24",
23
- ASSERT_MY_AMOUNT: "25",
24
- // # the conditions below ensure that we're "far enough" in the future
25
- // # wall-clock time
26
- ASSERT_SECONDS_RELATIVE: "32",
27
- ASSERT_SECONDS_ABSOLUTE: "33",
28
- // # block index
29
- ASSERT_HEIGHT_RELATIVE: "34",
30
- ASSERT_HEIGHT_ABSOLUTE: "35",
31
- };
@@ -1,6 +0,0 @@
1
- import { ConditionOpcode } from "./condition_opcodes";
2
- import { bytes } from "./_python_types_";
3
- export declare type ConditionWithArgs = {
4
- opcode: ConditionOpcode;
5
- vars: bytes[];
6
- };
@@ -1,8 +0,0 @@
1
- import { bytes32 } from "./blockchain_format/sized_bytes";
2
- import { ConditionOpcode } from "./condition_opcodes";
3
- import { ConditionWithArgs } from "./condition_with_args";
4
- export declare type NPC = {
5
- coin_name: bytes32;
6
- puzzle_hash: bytes32;
7
- conditions: Array<[ConditionOpcode, ConditionWithArgs[]]>;
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });