chia-agent 3.0.1 → 6.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +177 -0
  2. package/README.md +9 -13
  3. package/api/chia/consensus/blockchain.d.ts +1 -0
  4. package/api/chia/{types/condition_with_args.js → consensus/blockchain.js} +0 -0
  5. package/api/chia/consensus/cost_calculator.d.ts +3 -3
  6. package/api/chia/farmer/farmer.d.ts +1 -0
  7. package/api/chia/harvester/harvester.d.ts +2 -3
  8. package/api/chia/plot-sync/receiver.d.ts +22 -0
  9. package/api/chia/{types/name_puzzle_condition.js → plot-sync/receiver.js} +0 -0
  10. package/api/chia/pools/pool_config.d.ts +0 -1
  11. package/api/chia/protocols/harvester_protocol.d.ts +0 -5
  12. package/api/chia/server/outbound_message.d.ts +1 -0
  13. package/api/chia/{wallet/util/backup_utils.js → server/outbound_message.js} +0 -0
  14. package/api/chia/timelord/types.d.ts +1 -0
  15. package/api/chia/{wallet/util/trade_utils.js → timelord/types.js} +0 -0
  16. package/api/chia/types/coin_record.d.ts +3 -1
  17. package/api/chia/types/spend_bundle_condition.d.ts +18 -0
  18. package/api/chia/types/spend_bundle_condition.js +2 -0
  19. package/api/chia/wallet/cat_wallet/cat_constants.d.ts +6 -0
  20. package/api/chia/wallet/cat_wallet/cat_constants.js +2 -0
  21. package/api/chia/wallet/trade_record.d.ts +24 -0
  22. package/api/chia/wallet/trade_record.js +1 -0
  23. package/api/chia/wallet/transaction_record.d.ts +7 -2
  24. package/api/chia/wallet/util/wallet_types.d.ts +1 -1
  25. package/api/chia/wallet/util/wallet_types.js +1 -1
  26. package/api/rpc/common/index.d.ts +40 -0
  27. package/api/rpc/common/index.js +48 -0
  28. package/api/rpc/crawler/index.d.ts +29 -0
  29. package/api/rpc/crawler/index.js +27 -0
  30. package/api/rpc/farmer/index.d.ts +82 -10
  31. package/api/rpc/farmer/index.js +36 -1
  32. package/api/rpc/full_node/index.d.ts +39 -8
  33. package/api/rpc/full_node/index.js +21 -1
  34. package/api/rpc/index.d.ts +16 -10
  35. package/api/rpc/index.js +42 -12
  36. package/api/rpc/wallet/index.d.ts +198 -114
  37. package/api/rpc/wallet/index.js +98 -49
  38. package/api/types.d.ts +16 -0
  39. package/api/types.js +2 -1
  40. package/api/ws/crawler/index.d.ts +25 -0
  41. package/api/ws/crawler/index.js +40 -0
  42. package/api/ws/daemon/index.d.ts +8 -0
  43. package/api/ws/daemon/index.js +9 -2
  44. package/api/ws/farmer/index.d.ts +20 -8
  45. package/api/ws/farmer/index.js +31 -5
  46. package/api/ws/full_node/index.d.ts +50 -4
  47. package/api/ws/full_node/index.js +40 -1
  48. package/api/ws/harvester/index.d.ts +9 -3
  49. package/api/ws/harvester/index.js +14 -1
  50. package/api/ws/index.d.ts +22 -16
  51. package/api/ws/index.js +54 -33
  52. package/api/ws/timelord/index.d.ts +38 -0
  53. package/api/ws/timelord/index.js +66 -0
  54. package/api/ws/wallet/index.d.ts +32 -6
  55. package/api/ws/wallet/index.js +42 -3
  56. package/daemon/connection.d.ts +2 -2
  57. package/daemon/index.d.ts +6 -6
  58. package/index.d.ts +0 -2
  59. package/package.json +2 -2
  60. package/api/chia/types/condition_opcodes.d.ts +0 -20
  61. package/api/chia/types/condition_opcodes.js +0 -31
  62. package/api/chia/types/condition_with_args.d.ts +0 -6
  63. package/api/chia/types/name_puzzle_condition.d.ts +0 -8
  64. package/api/chia/wallet/util/backup_utils.d.ts +0 -25
  65. package/api/chia/wallet/util/trade_utils.d.ts +0 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,179 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.0.0]
4
+ ### Minor Breaking Change
5
+ - At chia-blockchain@1.3.5, a farmer websocket API `new_plots` was replaced by
6
+ `harvester_update` and `harvester_removed`.
7
+ This change is not critical because in application's point of view it may just miss new plot info but
8
+ farming will continue without problem.
9
+ ### Removed
10
+ - [Farmer WebSocket API](./src/api/ws/farmer)
11
+ - `on_new_plots`
12
+ ### Added
13
+ - [New Farmer WebSocket API](./src/api/ws/farmer)
14
+ - [`harvester_updated`](./src/api/ws/farmer/README.md#on_harvester_update)
15
+ - [`harvester_removed`](./src/api/ws/farmer/README.md#on_harvester_removed)
16
+ - [New Farmer RPC API](./src/api/rpc/farmer)
17
+ - [`get_harvesters_summary`](./src/api/rpc/farmer/README.md#get_harvesters_summaryagent)
18
+ - [`get_harvester_plots_valid`](./src/api/rpc/farmer/README.md#get_harvester_plots_validagent-params)
19
+ - [`get_harvester_plots_invalid`](./src/api/rpc/farmer/README.md#get_harvester_plots_invalidagent-params)
20
+ - [`get_harvester_plots_keys_missing`](./src/api/rpc/farmer/README.md#get_harvester_plots_keys_missingagent-params)
21
+ - [`get_harvester_plots_duplicates`](./src/api/rpc/farmer/README.md#get_harvester_plots_duplicatesagent-params)
22
+ ### Changed
23
+ - `Plot` type at `chia/harvester/harvester.py` was changed.
24
+ (Removed deprecated `plot-seed` and change the type of `time_modified` to `int` from `float`)
25
+ As a result, the following APIs are affected:
26
+ - `get_plots` of Harvester RPC API
27
+ - `on_get_plots` of Harvester WebSocket API
28
+ - [`get_pool_state`](./src/api/rpc/farmer/README.md#get_pool_stateagent)
29
+ - `plot_count` property is added
30
+ ### Fixed
31
+ - Fixed an issue where README description of `get_harvesters`(Farmer RPC API) did not reflect actual API format
32
+ - Added missing `get_pool_login_link` of Farmer RPC API to `./src/api/rpc/index.ts`
33
+
34
+ ## [5.0.0]
35
+ ### Breaking Change
36
+ - At chia-blockchain@1.3.4, in `chia/consensus/cost_calculator.py`,
37
+ `NPCResult.npc_list` was removed and `NPCResult.conds` was added.
38
+ As a result, the RPC APIs below might be incompatible between `1.3.3` and `1.3.4`.
39
+ - `get_all_mempool_items` Of FullNode RPC API
40
+ - `get_mempool_item_by_tx_id` Of FullNode RPC API
41
+ ### Added
42
+ - [New FullNode RPC API](./src/api/rpc/full_node)
43
+ - [`get_coin_records_by_hint`](./src/api/rpc/full_node/README.md#get_coin_records_by_hintagent-params)
44
+ - [New Wallet RPC API](./src/api/rpc/wallet)
45
+ - [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params)
46
+ - [`get_stray_cats`](./src/api/rpc/wallet/README.md#get_stray_catsagent)
47
+ ### Changed
48
+ - [FullNode RPC API](./src/api/rpc/full_node)
49
+ - Updated [`get_additions_and_removals`](./src/api/rpc/full_node/README.md#get_additions_and_removalsagent-params)
50
+ - [Wallet RPC API](./src/api/rpc/wallet)
51
+ - Updated [`get_wallets`](./src/api/rpc/wallet/README.md#get_walletsagent-params)
52
+ - Updated [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params)
53
+ - The following APIs changed because a new property was added to `TradeRecord` class at `chia/wallet/trade_record.py`
54
+ This is not a breaking change because just adding a property is backward compatible.
55
+ - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
56
+ - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
57
+ - [`get_offer`](./src/api/rpc/wallet/README.md#get_offeragent-params)
58
+ - [`get_all_offers`](./src/api/rpc/wallet/README.md#get_all_offersagent-params)
59
+ ### Fixed
60
+ - Fixed issues where the following full_node RPC APIs were not exported from `api/rpc/index.ts`.
61
+ - `get_coin_record_by_names`
62
+ - `get_coin_records_by_parent_ids`
63
+ - Fixed issues where the following wallet RPC APIs were not exported from `api/rpc/index.ts`.
64
+ - `delete_unconfirmed_transactions`
65
+ - Fixed an issue where README description of `get_blockchain_state` of FullNode RPC API was missing some properties.
66
+
67
+ ## [4.0.0]
68
+ ### Breaking Change
69
+ - At chia-blockchain@1.3.0, in `chia/consensus/cost_calculator.py`,
70
+ `NPCResult.clvm_cost` was renamed to `NPCResult.cost`.
71
+ As a result, the RPC APIs below might be incompatible between `1.2.11` and `1.3.0`.
72
+ - `get_all_mempool_items` Of FullNode RPC API
73
+ - `get_mempool_item_by_tx_id` Of FullNode RPC API
74
+ - In `chia/pools/pool_config.py`,
75
+ `authentication_public_key` was removed from `PoolWalletConfig`.
76
+ As a result, the RPC APIs below might be incompatible between `1.2.11` and `1.3.0`.
77
+ - `get_pool_state` of Farmer RPC API
78
+ - In `chia/types/coin_record.py`, `CoinRecord.spent` was removed and turned into a getter method.
79
+ As a result, the RPC APIs below might be incompatible between `1.2.11` and `1.3.0`.
80
+ - `get_additions_and_removals` of FullNode RPC API
81
+ - Wallet RPC API `create_backup` was removed
82
+ - Wallet RPC API `get_discrepancies_for_offer` was removed
83
+ - Wallet RPC API `respond_to_offer` was removed
84
+ - Wallet RPC API `get_trade` was removed
85
+ - Wallet RPC API `get_all_trades` was removed
86
+ - Wallet RPC API `cancel_trade` was removed
87
+ - Wallet RPC API `cc_set_name` was renamed to `cat_set_name`
88
+ - Wallet RPC API `cc_get_name` was renamed to `cat_get_name`
89
+ - Wallet RPC API `cc_spend` was renamed to `cat_spend`
90
+ - Wallet RPC API `cc_get_colour` was renamed to `cat_get_asset_id`
91
+ - The request parameter of Wallet RPC API `create_offer_for_ids` was changed and incompatible with older API.
92
+ - The request parameter of Wallet RPC API `create_new_wallet` was changed and incompatible with older API.
93
+ ### Removed
94
+ - Removed `create_backup` of Wallet RPC API
95
+ - Removed `get_discrepancies_for_offer` of Wallet RPC API
96
+ - Removed `respond_to_offer` of Wallet RPC API
97
+ - Removed `get_trade` of Wallet RPC API
98
+ - Removed `get_all_trades` of Wallet RPC API
99
+ - Removed `cancel_trade` of Wallet RPC API
100
+ - Removed `TradeRecordInJson` at `src/api/chia/wallet/util/trade_utils.ts`
101
+ ### Added
102
+ - Added `metrics` service
103
+ - [Common RPC API](./src/api/rpc/common)
104
+ - [`get_connections`](./src/api/rpc/common/README.md#get_connectionsagent-params)
105
+ - [`open_connection`](./src/api/rpc/common/README.md#open_connectionagent-params)
106
+ - [`close_connection`](./src/api/rpc/common/README.md#close_connectionagent-params)
107
+ - [`stop_node`](./src/api/rpc/common/README.md#stop_nodeagent)
108
+ - [`get_routes`](./src/api/rpc/common/README.md#get_routesagent)
109
+ - [Timelord WebSocket API](./src/api/ws/timelord/README.md#usage)
110
+ - [`finished_pot`](./src/api/ws/timelord/README.md#on_finished_pot)
111
+ - [`new_compact_proof`](./src/api/ws/timelord/README.md#on_new_compact_proof)
112
+ - [`skipping_peak`](./src/api/ws/timelord/README.md#on_skipping_peak)
113
+ - [`new_peak`](./src/api/ws/timelord/README.md#on_new_peak)
114
+ - [Crawler RPC API](./src/api/rpc/crawler)
115
+ - [`get_peer_counts`](./src/api/rpc/crawler/README.md#get_peer_countsagent)
116
+ - [`get_ips_after_timestamp`](./src/api/rpc/crawler/README.md#get_ips_after_timestampagent-params)
117
+ - [Crawler WebSocket API](./src/api/ws/crawler)
118
+ - [`on_message_from_crawler`](./src/api/ws/crawler/README.md#on_message_from_crawler)
119
+ - [`on_loaded_initial_peers`](./src/api/ws/crawler/README.md#on_loaded_initial_peers)
120
+ - [`on_crawl_batch_completed`](./src/api/ws/crawler/README.md#on_crawl_batch_completed)
121
+ - [New farmer WebSocket API](./src/api/ws/farmer)
122
+ - [`get_connections`](./src/api/ws/farmer/README.md#on_get_connections)
123
+ - [New FullNode RPC API](./src/api/rpc/full_node)
124
+ - [`get_block_count_metrics`](./src/api/rpc/full_node/README.md#get_block_count_metricsagent)
125
+ - [New FullNode WebSocket API](./src/api/ws/full_node)
126
+ - [`get_connections`](./src/api/ws/full_node/README.md#on_get_connections)
127
+ - [`block`](./src/api/ws/full_node/README.md#on_block)
128
+ - [`signage_point`](./src/api/ws/full_node/README.md#on_signage_point)
129
+ - [New harvester WebSocket API](./src/api/ws/harvester)
130
+ - [`get_connections`](./src/api/ws/harvester/README.md#on_get_connections)
131
+ - [New wallet RPC API](./src/api/rpc/wallet)
132
+ - [`get_logged_in_fingerprint`](./src/api/rpc/wallet/README.md#get_logged_in_fingerprintagent)
133
+ - [`push_tx`](./src/api/rpc/wallet/README.md#push_txagent-params)
134
+ - [`cat_asset_id_to_name`](./src/api/rpc/wallet/README.md#cat_asset_id_to_nameagent-params)
135
+ - [`get_offer_summary`](./src/api/rpc/wallet/README.md#get_offer_summaryagent-params)
136
+ - [`check_offer_validity`](./src/api/rpc/wallet/README.md#check_offer_validityagent-params)
137
+ - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
138
+ - [`get_offer`](./src/api/rpc/wallet/README.md#get_offeragent-params)
139
+ - [`get_all_offers`](./src/api/rpc/wallet/README.md#get_all_offersagent-params)
140
+ - [`get_offers_count`](./src/api/rpc/wallet/README.md#get_offers_countagent)
141
+ - [`cancel_offer`](./src/api/rpc/wallet/README.md#cancel_offeragent-params)
142
+ - [`get_cat_list`](./src/api/rpc/wallet/README.md#get_cat_listagent)
143
+ - [New wallet WebSocket API](./src/api/ws/wallet)
144
+ - [`get_connections`](./src/api/ws/wallet/README.md#on_get_connections)
145
+ - [`sync_changed`](./src/api/ws/wallet/README.md#on_sync_changed_of_wallet)
146
+ - [`coin_added`](./src/api/ws/wallet/README.md#on_coin_added)
147
+ - [New daemon API](./src/api/ws/daemon)
148
+ - [`get_version`](./src/api/ws/daemon/README.md#get_versiondaemon)
149
+ ### Changed
150
+ - Renamed `NPCResult.clvm_cost` to `NPCResult.cost`
151
+ - Removed `authentication_public_key` from `PoolWalletConfig`
152
+ - Set actual value to `destination` property on websocket APIs. (i.e. `wallet_ui`, `metrics`)
153
+ - Updated [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent) of FullNode RPC API
154
+ - Updated [`get_blocks`](./src/api/rpc/full_node/README.md#get_blocksagent-params) of FullNode RPC API
155
+ - Renamed `cc_set_name` of Wallet RPC API to [`cat_set_name`](./src/api/rpc/wallet/README.md#cat_set_nameagent-params)
156
+ - Renamed `cc_get_name` of Wallet RPC API to [`cat_get_name`](./src/api/rpc/wallet/README.md#cat_get_nameagent-params)
157
+ - Renamed `cc_spend` of Wallet RPC API to [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
158
+ - Renamed `cc_get_colour` of Wallet RPC API to [`cat_get_asset_id`](./src/api/rpc/wallet/README.md#cat_get_asset_idagent-params)
159
+ - Updated [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params) of Wallet RPC API
160
+ - Updated [`log_in`](./src/api/rpc/wallet/README.md#log_inagent-params) of Wallet RPC API
161
+ - Updated [`add_key`](./src/api/rpc/wallet/README.md#add_keyagent-params) of Wallet RPC API
162
+ - Updated [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params) of Wallet RPC API
163
+ - Updated [`get_wallet_balance`](./src/api/rpc/wallet/README.md#get_wallet_balanceagent-params) of Wallet RPC API
164
+ - Updated [`get_transaction`](./src/api/rpc/wallet/README.md#get_transactionagent-params) of Wallet RPC API
165
+ - Updated [`get_transactions`](./src/api/rpc/wallet/README.md#get_transactionsagent-params) of Wallet RPC API
166
+ - Updated [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params) of Wallet RPC API
167
+ - Updated [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params) of Wallet RPC API
168
+ - Updated [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params) of Wallet RPC API
169
+ - Updated [`pw_join_pool`](./src/api/rpc/wallet/README.md#pw_join_poolagent-params) of Wallet RPC API
170
+ - Updated [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params) of Wallet RPC API
171
+ - Updated [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params) of Wallet RPC API
172
+ - Added `memos` to `TransactionRecord` in `src/api/chia/wallet/transaction_record.ts`.
173
+ - Renamed `COLOURED_COIN` to `CAT` of `WalletType` in `src/api/chia/wallet/util/wallet_type.ts`.
174
+ ### Fixed
175
+ - Replaced `unknown` type with actual type for `on_state_changed_of_wallet` in wallet WebSocket API
176
+
3
177
  ## [3.0.1]
4
178
  ### Added
5
179
  - Added `skip_hostname_verification` option for `RPCAgent`
@@ -210,6 +384,9 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
210
384
  Initial release.
211
385
 
212
386
  <!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
387
+ [6.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v5.0.0...v6.0.0
388
+ [5.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v4.0.0...v5.0.0
389
+ [4.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v3.0.1...v4.0.0
213
390
  [3.0.1]: https://github.com/Chia-Mine/chia-agent/compare/v3.0.0...v3.0.1
214
391
  [3.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v2.0.6...v3.0.0
215
392
  [2.0.6]: https://github.com/Chia-Mine/chia-agent/compare/v2.0.5...v2.0.6
package/README.md CHANGED
@@ -1,16 +1,12 @@
1
- **Now supports New Pool API! :tada::tada:**
2
-
3
- ---
4
-
5
1
  # chia-agent
6
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)
7
3
 
8
4
  chia rpc/websocket client library for NodeJS.
9
- Supports all RPC/Websocket API available at `chia 1.2.11`.
5
+ Supports all RPC/Websocket API available at `chia 1.3.5`.
10
6
  \(If you need previous version, search for the corresponding release [here](https://github.com/Chia-Mine/chia-agent/releases)\)
11
7
 
12
8
  you can develop your own nodejs script with `chia-agent` to:
13
- - 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`.
14
10
  - send email when proof is found.
15
11
  - trigger scripts when target event is observed.
16
12
  - start/stop services.
@@ -26,17 +22,17 @@ yarn add chia-agent
26
22
 
27
23
  ## Compatibility
28
24
  This code is compatible with:
29
- - [`b74a3f3849cadeece2fac3efa3cb55d7d3a0647f`](https://github.com/Chia-Network/chia-blockchain/tree/b74a3f3849cadeece2fac3efa3cb55d7d3a0647f) of [chia-blockchain@1.2.11](https://github.com/Chia-Network/chia-blockchain)
30
- - [Diff to the latest chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/b74a3f3849cadeece2fac3efa3cb55d7d3a0647f...main)
31
- - [`d6d1d0ea41b81e1c6b23688206c6ab3ba6418a95`](https://github.com/Chia-Network/pool-reference/tree/d6d1d0ea41b81e1c6b23688206c6ab3ba6418a95) of [pool-reference](https://github.com/Chia-Network/pool-reference)
32
- - [Diff to the latest pool-reference](https://github.com/Chia-Network/pool-reference/compare/d6d1d0ea41b81e1c6b23688206c6ab3ba6418a95...main)
25
+ - [`0f5a6df4ffcd7b1d5b950b9f40c15b4e6045ee1b`](https://github.com/Chia-Network/chia-blockchain/tree/0f5a6df4ffcd7b1d5b950b9f40c15b4e6045ee1b) of [chia-blockchain 1.3.5](https://github.com/Chia-Network/chia-blockchain)
26
+ - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/0f5a6df4ffcd7b1d5b950b9f40c15b4e6045ee1b...main)
27
+ - [`374e7e6dc2d6d7941bb650f0e4ac5c01db104569`](https://github.com/Chia-Network/pool-reference/tree/374e7e6dc2d6d7941bb650f0e4ac5c01db104569) of [pool-reference](https://github.com/Chia-Network/pool-reference)
28
+ - [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/374e7e6dc2d6d7941bb650f0e4ac5c01db104569...main)
33
29
 
34
30
  ## API
35
31
  There are 2 kinds of APIs in chia.
36
32
  `RPC API` and `Websocket API`.
37
33
 
38
34
  ### RPC API
39
- 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`.
40
36
 
41
37
  RPC API is just an async function in a traditional request/response style.
42
38
 
@@ -57,12 +53,12 @@ console.log(res.plots[0]);
57
53
  {
58
54
  file_size: 108875876912,
59
55
  filename: 'M:\\plot-k32-yyyy-mm-dd-xx-xx-xxxxxxxxxxxxxxxxxxxxxxxxx.plot',
60
- 'plot-seed': '0x3098da093...',
56
+ plot_id: '...',
61
57
  plot_public_key: '0x934a93489...',
62
58
  pool_contract_puzzle_hash: null,
63
59
  pool_public_key: '0xb0aa9485c0d...',
64
60
  size: 32,
65
- time_modified: 1619540745.1640463
61
+ time_modified: 1619540745
66
62
  }
67
63
  */
68
64
  ```
@@ -0,0 +1 @@
1
+ export declare type ReceiveBlockResult = 1 | 2 | 3 | 4 | 5;
@@ -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[];
6
- clvm_cost: uint64;
5
+ conds: Optional<SpendBundleConditions>;
6
+ cost: uint64;
7
7
  };
@@ -14,4 +14,5 @@ export declare type PoolState = {
14
14
  authentication_token_timeout: uint8;
15
15
  pool_config: PoolWalletConfig;
16
16
  p2_singleton_puzzle_hash: str;
17
+ plot_count: int;
17
18
  };
@@ -1,13 +1,12 @@
1
- import { bytes, float, G1Element, int, Optional, str } from "../types/_python_types_";
1
+ import { bytes, G1Element, int, Optional, str } from "../types/_python_types_";
2
2
  import { bytes32 } from "../types/blockchain_format/sized_bytes";
3
3
  export declare type Plot = {
4
4
  filename: str;
5
5
  size: int;
6
- "plot-seed": bytes;
7
6
  plot_id: bytes;
8
7
  pool_public_key: Optional<G1Element>;
9
8
  pool_contract_puzzle_hash: Optional<bytes32>;
10
9
  plot_public_key: G1Element;
11
10
  file_size: int;
12
- time_modified: float;
11
+ time_modified: int;
13
12
  };
@@ -0,0 +1,22 @@
1
+ import { bytes32 } from "../types/blockchain_format/sized_bytes";
2
+ import { bool, float, int, None, Optional, str, uint32 } from "../types/_python_types_";
3
+ import { Plot } from "../protocols/harvester_protocol";
4
+ export declare type MayBeSummary<S, O> = S extends true ? int : O;
5
+ export declare type Receiver<SUMMARY extends boolean = false> = {
6
+ connection: {
7
+ node_id: bytes32;
8
+ host: str;
9
+ port: int;
10
+ };
11
+ plots: MayBeSummary<SUMMARY, Plot[]>;
12
+ failed_to_open_filenames: MayBeSummary<SUMMARY, str[]>;
13
+ no_key_filenames: MayBeSummary<SUMMARY, str[]>;
14
+ duplicates: MayBeSummary<SUMMARY, str[]>;
15
+ total_plot_size: int;
16
+ syncing: {
17
+ initial: bool;
18
+ plot_files_processed: uint32;
19
+ plot_files_total: uint32;
20
+ } | None;
21
+ last_sync_time: Optional<float>;
22
+ };
@@ -7,5 +7,4 @@ export declare type PoolWalletConfig = {
7
7
  target_puzzle_hash: bytes32;
8
8
  p2_singleton_puzzle_hash: bytes32;
9
9
  owner_public_key: G1Element;
10
- authentication_public_key: G1Element;
11
10
  };
@@ -10,8 +10,3 @@ export declare type Plot = {
10
10
  file_size: uint64;
11
11
  time_modified: uint64;
12
12
  };
13
- export declare type RespondPlots = {
14
- plots: Plot[];
15
- failed_to_open_filenames: str[];
16
- no_key_filenames: str[];
17
- };
@@ -0,0 +1 @@
1
+ export declare type NodeType = 1 | 2 | 3 | 4 | 5 | 6;
@@ -0,0 +1 @@
1
+ export declare type Chain = 1 | 2 | 3 | 4;
@@ -4,7 +4,9 @@ export declare type CoinRecord = {
4
4
  coin: Coin;
5
5
  confirmed_block_index: uint32;
6
6
  spent_block_index: uint32;
7
- spent: bool;
8
7
  coinbase: bool;
9
8
  timestamp: uint64;
10
9
  };
10
+ export declare type CoinRecordBackwardCompatible = CoinRecord & {
11
+ spent: bool;
12
+ };
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { str } from "../../types/_python_types_";
2
+ export declare type CAT = {
3
+ asset_id: str;
4
+ name: str;
5
+ symbol: str;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { bool, bytes, int, Optional, str, uint32, uint64, uint8 } from "../types/_python_types_";
2
+ import { Coin } from "../types/blockchain_format/coin";
3
+ import { bytes32 } from "../types/blockchain_format/sized_bytes";
4
+ export declare type TradeRecord = {
5
+ confirmed_at_index: uint32;
6
+ accepted_at_time: Optional<uint64>;
7
+ created_at_time: uint64;
8
+ is_my_offer: bool;
9
+ sent: uint32;
10
+ offer: bytes;
11
+ taken_offer: Optional<bytes>;
12
+ coins_of_interest: Coin[];
13
+ trade_id: bytes32;
14
+ status: uint32;
15
+ sent_to: Array<[str, uint8, Optional<str>]>;
16
+ };
17
+ export declare type TradeRecordConvenience = {
18
+ summary: {
19
+ offered: Record<str, int>;
20
+ requested: Record<str, int>;
21
+ fees: int;
22
+ };
23
+ pending: Record<str, int>;
24
+ } & Omit<TradeRecord, "offer">;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  // dependency: TradeRecord, by: `get_trade` of Wallet RPC API
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { bool, Optional, uint32, uint64, uint8 } from "../types/_python_types_";
1
+ import { bool, bytes, Optional, str, uint32, uint64, uint8 } from "../types/_python_types_";
2
2
  import { SpendBundle } from "../types/spend_bundle";
3
3
  import { Coin } from "../types/blockchain_format/coin";
4
4
  import { bytes32 } from "../types/blockchain_format/sized_bytes";
@@ -12,10 +12,15 @@ export declare type TransactionRecord = {
12
12
  sent: uint32;
13
13
  spend_bundle: Optional<SpendBundle>;
14
14
  additions: Coin[];
15
- removals: Coin;
15
+ removals: Coin[];
16
16
  wallet_id: uint32;
17
17
  sent_to: Array<[string, uint8, string | undefined]>;
18
18
  trade_id: Optional<bytes32>;
19
19
  type: uint32;
20
20
  name: bytes32;
21
+ memos: Array<[bytes32, bytes[]]>;
21
22
  };
23
+ export declare type TransactionRecordConvenience = {
24
+ to_address: str;
25
+ memos: Record<str, str>;
26
+ } & TransactionRecord;
@@ -5,7 +5,7 @@ export declare const WalletType: {
5
5
  AUTHORIZED_PAYEE: number;
6
6
  MULTI_SIG: number;
7
7
  CUSTODY: number;
8
- COLOURED_COIN: number;
8
+ CAT: number;
9
9
  RECOVERABLE: number;
10
10
  DISTRIBUTED_ID: number;
11
11
  POOLING_WALLET: number;
@@ -9,7 +9,7 @@ exports.WalletType = {
9
9
  AUTHORIZED_PAYEE: 3,
10
10
  MULTI_SIG: 4,
11
11
  CUSTODY: 5,
12
- COLOURED_COIN: 6,
12
+ CAT: 6,
13
13
  RECOVERABLE: 7,
14
14
  DISTRIBUTED_ID: 8,
15
15
  POOLING_WALLET: 9,
@@ -0,0 +1,40 @@
1
+ import { str, uint16 } from "../../chia/types/_python_types_";
2
+ import { TRPCAgent } from "../../../rpc/index";
3
+ import { TConnectionGeneral } from "../../types";
4
+ import { TConnectionFullNode } from "../../ws/full_node/index";
5
+ export declare const chia_common_service = "";
6
+ export declare type chia_common_service = typeof chia_common_service;
7
+ export declare const get_connections_command = "get_connections";
8
+ export declare type get_connections_command = typeof get_connections_command;
9
+ export declare type TGetConnectionsRequest = {
10
+ node_type?: str;
11
+ };
12
+ export declare type TGetConnectionsResponse = {
13
+ connections: TConnectionGeneral[] | TConnectionFullNode[];
14
+ };
15
+ export declare function get_connections(agent: TRPCAgent, params: TGetConnectionsRequest): Promise<TGetConnectionsResponse>;
16
+ export declare const open_connection_command = "open_connection";
17
+ export declare type open_connection_command = typeof open_connection_command;
18
+ export declare type TOpenConnectionRequest = {
19
+ host: str;
20
+ port: uint16;
21
+ };
22
+ export declare type TOpenConnectionResponse = {};
23
+ export declare function open_connection(agent: TRPCAgent, params: TOpenConnectionRequest): Promise<TOpenConnectionResponse>;
24
+ export declare const close_connection_command = "close_connection";
25
+ export declare type close_connection_command = typeof close_connection_command;
26
+ export declare type TCloseConnectionRequest = {
27
+ node_id: str;
28
+ };
29
+ export declare type TCloseConnectionResponse = {};
30
+ export declare function close_connection(agent: TRPCAgent, params: TCloseConnectionRequest): Promise<TCloseConnectionResponse>;
31
+ export declare const stop_node_command = "stop_node";
32
+ export declare type stop_node_command = typeof stop_node_command;
33
+ export declare type TStopNodeResponse = {};
34
+ export declare function stop_node(agent: TRPCAgent): Promise<TStopNodeResponse>;
35
+ export declare const get_routes_command = "get_routes";
36
+ export declare type get_routes_command = typeof get_routes_command;
37
+ export declare type TGetRoutesResponse = {
38
+ routes: str[];
39
+ };
40
+ export declare function get_routes(agent: TRPCAgent): Promise<TGetRoutesResponse>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.get_routes = exports.get_routes_command = exports.stop_node = exports.stop_node_command = exports.close_connection = exports.close_connection_command = exports.open_connection = exports.open_connection_command = exports.get_connections = exports.get_connections_command = exports.chia_common_service = void 0;
13
+ exports.chia_common_service = "";
14
+ exports.get_connections_command = "get_connections";
15
+ function get_connections(agent, params) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ return agent.sendMessage(exports.chia_common_service, exports.get_connections_command, params);
18
+ });
19
+ }
20
+ exports.get_connections = get_connections;
21
+ exports.open_connection_command = "open_connection";
22
+ function open_connection(agent, params) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return agent.sendMessage(exports.chia_common_service, exports.open_connection_command, params);
25
+ });
26
+ }
27
+ exports.open_connection = open_connection;
28
+ exports.close_connection_command = "close_connection";
29
+ function close_connection(agent, params) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ return agent.sendMessage(exports.chia_common_service, exports.close_connection_command, params);
32
+ });
33
+ }
34
+ exports.close_connection = close_connection;
35
+ exports.stop_node_command = "stop_node";
36
+ function stop_node(agent) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ return agent.sendMessage(exports.chia_common_service, exports.stop_node_command);
39
+ });
40
+ }
41
+ exports.stop_node = stop_node;
42
+ exports.get_routes_command = "get_routes";
43
+ function get_routes(agent) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ return agent.sendMessage(exports.chia_common_service, exports.get_routes_command);
46
+ });
47
+ }
48
+ exports.get_routes = get_routes;
@@ -0,0 +1,29 @@
1
+ import { int, str, uint64 } from "../../chia/types/_python_types_";
2
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
3
+ import { TRPCAgent } from "../../../rpc/index";
4
+ export declare const chia_crawler_service = "chia_crawler";
5
+ export declare type chia_crawler_service = typeof chia_crawler_service;
6
+ export declare const get_peer_counts_command = "get_peer_counts";
7
+ export declare type get_peer_counts_command = typeof get_peer_counts_command;
8
+ export declare type TGetPeerCountsResponse = {
9
+ peer_counts: {
10
+ total_last_5_days: int;
11
+ reliable_nodes: int;
12
+ ipv4_last_5_days: bytes32;
13
+ ipv6_last_5_days: uint64;
14
+ versions: Record<str, int>;
15
+ };
16
+ };
17
+ export declare function get_peer_counts(agent: TRPCAgent): Promise<TGetPeerCountsResponse>;
18
+ export declare const get_ips_after_timestamp_command = "get_ips_after_timestamp";
19
+ export declare type get_ips_after_timestamp_command = typeof get_ips_after_timestamp_command;
20
+ export declare type TGetIpsAfterTimestampRequest = {
21
+ after: int;
22
+ offset?: int;
23
+ limit?: int;
24
+ };
25
+ export declare type TGetIpsAfterTimestampResponse = {
26
+ ips: str[];
27
+ total: int;
28
+ };
29
+ export declare function get_ips_after_timestamp(agent: TRPCAgent, params: TGetIpsAfterTimestampRequest): Promise<TGetIpsAfterTimestampResponse>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.get_ips_after_timestamp = exports.get_ips_after_timestamp_command = exports.get_peer_counts = exports.get_peer_counts_command = exports.chia_crawler_service = void 0;
13
+ exports.chia_crawler_service = "chia_crawler";
14
+ exports.get_peer_counts_command = "get_peer_counts";
15
+ function get_peer_counts(agent) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ return agent.sendMessage(exports.chia_crawler_service, exports.get_peer_counts_command);
18
+ });
19
+ }
20
+ exports.get_peer_counts = get_peer_counts;
21
+ exports.get_ips_after_timestamp_command = "get_ips_after_timestamp";
22
+ function get_ips_after_timestamp(agent, params) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return agent.sendMessage(exports.chia_crawler_service, exports.get_ips_after_timestamp_command, params);
25
+ });
26
+ }
27
+ exports.get_ips_after_timestamp = get_ips_after_timestamp;