chia-agent 10.0.0 → 11.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,12 +1,173 @@
1
1
  # Changelog
2
2
 
3
+ ## [11.0.0]
4
+ ### Breaking change
5
+ JSONified `MempoolItem` replaced original `MempoolItem` in `chia/types/mempool_items.py`
6
+ for 2 RPC API responses listed below.
7
+ As a result of this change, `removals` was added and `height_added_to_mempool`/`assert_height` were removed
8
+ from those RPC API responses.
9
+ - [FullNode RPC API](./src/api/rpc/full_node)
10
+ - [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#get_all_mempool_itemsagent)
11
+ - [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#get_mempool_item_by_tx_idagent-params)
12
+ ### Changed
13
+ - [FullNode RPC API](./src/api/rpc/full_node)
14
+ - [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
15
+ - The type of `mempool_fees` was changed to `int` from `Mojos`(`uint64`)
16
+ - [`get_fee_estimate`](./src/api/rpc/full_node/README.md#get_fee_estimateagent-params)
17
+ - The type of `mempool_fees` was changed to `int` from `Mojos`(`uint64`)
18
+ - [Wallet RPC API](./src/api/rpc/wallet)
19
+ - [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
20
+ - Added `reuse_puzhash` to request parameter
21
+ - [`sign_message_by_address`](./src/api/rpc/wallet/README.md#sign_message_by_addressagent-params)
22
+ - Added `is_hex` to request parameter
23
+ - [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params)
24
+ - Added `is_hex` to request parameter
25
+ - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
26
+ - Added `reuse_puzhash` to request parameter
27
+ - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
28
+ - Added `reuse_puzhash` to request parameter
29
+ - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
30
+ - Added `reuse_puzhash` to request parameter
31
+ - [`did_update_recovery_ids`](./src/api/rpc/wallet/README.md#did_update_recovery_idsagent-params)
32
+ - Added `reuse_puzhash` to request parameter
33
+ - [`did_get_info`](./src/api/rpc/wallet/README.md#did_get_infoagent-params)
34
+ - Added `solution` to response
35
+ - [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params)
36
+ - Added `reuse_puzhash` to request parameter
37
+ - [`did_transfer_did`](./src/api/rpc/wallet/README.md#did_transfer_didagent-params)
38
+ - Added `reuse_puzhash` to request parameter
39
+ - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params)
40
+ - Added `reuse_puzhash` to request parameter
41
+ - [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params)
42
+ - Added `reuse_puzhash` to request parameter
43
+ - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
44
+ - Added `reuse_puzhash` to request parameter
45
+ - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params)
46
+ - Added `reuse_puzhash` to request parameter
47
+ - [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params)
48
+ - Added `reuse_puzhash` to request parameter
49
+ - [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params)
50
+ - Added `reuse_puzhash` to request parameter
51
+ - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params)
52
+ - Added `reuse_puzhash` to request parameter
53
+ - [Wallet WebSocket API](./src/api/ws/wallet)
54
+ - [`on_state_changed_of_wallet`](./src/api/ws/wallet/README.md#on_state_changed_of_wallet)
55
+ - Added `wallet_removed` to state list
56
+ - Added `error` and `status` property to `tx_update` state changed event
57
+
58
+ In `chia/wallet/nft_wallet/nft_info.py`, `nft_id` was added to `NftInfo`.
59
+ As a result of this change, the responses from following RPC APIs are affected.
60
+ - [Wallet RPC API](./src/api/rpc/full_node)
61
+ - [`nft_get_nfts`](./src/api/rpc/wallet/README.md#nft_get_nftsagent-params)
62
+ - [`nft_get_info`](./src/api/rpc/wallet/README.md#nft_get_infoagent-params)
63
+ ### Added
64
+ - [New FullNode(Simulator) RPC API](./src/api/rpc/full_node)
65
+ Big thanks to [Dishwasha](https://github.com/Dishwasha) for a PR for new Simulator API!
66
+ - [`get_all_blocks`](./src/api/rpc/full_node/README.md#get_all_blocksagent-params)
67
+ - [`farm_block`](./src/api/rpc/full_node/README.md#farm_blockagent-params)
68
+ - [`set_auto_farming`](./src/api/rpc/full_node/README.md#set_auto_farmingagent-params)
69
+ - [`get_auto_farming`](./src/api/rpc/full_node/README.md#get_auto_farmingagent-params)
70
+ - [`get_farming_ph`](./src/api/rpc/full_node/README.md#get_farming_phagent-params)
71
+ - [`get_all_coins`](./src/api/rpc/full_node/README.md#get_all_coinsagent-params)
72
+ - [`get_all_puzzle_hashes`](./src/api/rpc/full_node/README.md#get_all_puzzle_hashesagent-params)
73
+ - [`revert_blocks`](./src/api/rpc/full_node/README.md#revert_blocksagent-params)
74
+ - [`reorg_blocks`](./src/api/rpc/full_node/README.md#reorg_blocksagent-params)
75
+ - [New Farmer WebSocket API](./src/api/ws/farmer)
76
+ - [`on_add_connection`](./src/api/ws/farmer/README.md#on_add_connection)
77
+ - [`on_close_connection`](./src/api/ws/farmer/README.md#on_close_connection)
78
+ - [New Harvester WebSocket API](./src/api/ws/harvester)
79
+ - [`on_add_connection`](./src/api/ws/harvester/README.md#on_add_connection)
80
+ - [`on_close_connection`](./src/api/ws/harvester/README.md#on_close_connection)
81
+ - [New Wallet RPC API](./src/api/rpc/wallet)
82
+ - [`set_wallet_resync_on_startup`](./src/api/rpc/wallet/README.md#set_wallet_resync_on_startupagent-params)
83
+ - [`get_transaction_memo`](./src/api/rpc/wallet/README.md#get_transaction_memoagent-params)
84
+ - [`nft_count_nfts`](./src/api/rpc/wallet/README.md#nft_count_nftsagent-params)
85
+ - [New Wallet WebSocket API](./src/api/ws/wallet)
86
+ - [`on_add_connection`](./src/api/ws/wallet/README.md#on_add_connection)
87
+ - [`on_close_connection`](./src/api/ws/wallet/README.md#on_close_connection)
88
+ ### Fixed
89
+ - [Farmer WebSocket API](./src/api/ws/farmer)
90
+ - [`on_submitted_partial`](./src/api/ws/farmer/README.md#on_submitted_partial)
91
+ - Fixed an issue where `on_submitted_partial` was not working
92
+ - [Wallet RPC API](./src/api/rpc/wallet)
93
+ - [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params)
94
+ - Fixed an issue where `verify_signature` was not exposed via `require("chia-agent/api/rpc")`
95
+ - [Wallet WebSocket API](./src/api/ws/wallet)
96
+ - [`on_sync_changed`](./src/api/ws/wallet/README.md#on_sync_changed)
97
+ - Fixed an issue where `on_sync_changed` was defined as `on_sync_changed_of_wallet`
98
+ - [`on_coin_added`](./src/api/ws/wallet/README.md#on_coin_added)
99
+ - Fixed a typo. (WsCoindAddedMessage -> WsCoinAddedMessage)
100
+ - Fixed an issue where `on_coin_added` was defined as `on_coin_added_of_wallet`
101
+
102
+ ## [10.1.0]
103
+ ### Indirect Change
104
+ In `chia/types/mempool_items.py`, `assert_height` was added to `MempoolItem`.
105
+ As a result of this change, the responses from following RPC APIs are affected.
106
+ - [FullNode RPC API](./src/api/rpc/full_node)
107
+ - [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#get_all_mempool_itemsagent)
108
+ - [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#get_mempool_item_by_tx_idagent-params)
109
+ ### Added
110
+ - [New Wallet RPC API](./src/api/rpc/wallet)
111
+ - [`get_timestamp_for_height`](./src/api/rpc/wallet/README.md#get_timestamp_for_heightagent)
112
+ - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params)
113
+ ### Changed
114
+ - [Common RPC API](./src/api/rpc/common)
115
+ - [`open_connection`](./src/api/rpc/common/README.md#open_connectionagent-params)
116
+ - Added `success` to response
117
+ - Added `error` to response when `success` is `False`
118
+ - [FullNode RPC API](./src/api/rpc/full_node)
119
+ - [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
120
+ - Added `mempool_fees` to response
121
+ - [`get_fee_estimate`](./src/api/rpc/full_node/README.md#get_fee_estimateagent-params)
122
+ - Added `spend_type` to request parameter
123
+ - Added `spend_count` to request parameter
124
+ - Added `mempool_fees` to response
125
+ - Added `num_spends` to response
126
+ - Added `last_block_cost` to response
127
+ - Added `fees_last_block` to response
128
+ - Added `fee_rate_last_block` to response
129
+ - Added `last_tx_block_height` to response
130
+ - [Wallet RPC API](./src/api/rpc/wallet)
131
+ - [`get_notifications`](./src/api/rpc/wallet/README.md#get_notificationsagent-params)
132
+ - Added `height` to response
133
+ - [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params)
134
+ - Added `signing_mode` to request parameter
135
+ - [`sign_message_by_address`](./src/api/rpc/wallet/README.md#sign_message_by_addressagent-params)
136
+ - Added `signing_mode` to response
137
+ - [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params)
138
+ - Added `None` type to `latest_coin_id` in response
139
+ - Added `signing_mode` to response
140
+ - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
141
+ - Added `coins` to response
142
+ - [`get_offer_summary`](./src/api/rpc/wallet/README.md#get_offer_summaryagent-params)
143
+ - Added `id` to response
144
+ - [`check_offer_validity`](./src/api/rpc/wallet/README.md#check_offer_validityagent-params)
145
+ - Added `id` to response
146
+ - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params)
147
+ - Removed error response
148
+ - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
149
+ - Added `tx_num to response
150
+ - [`nft_get_wallet_did`](./src/api/rpc/wallet/README.md#nft_get_wallet_didagent-params)
151
+ - Removed error response
152
+ - [`nft_set_nft_status`](./src/api/rpc/wallet/README.md#nft_set_nft_statusagent-params)
153
+ - Removed error response
154
+ ### Fixed
155
+ - [FullNode RPC API](./src/api/rpc/full_node)
156
+ - [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
157
+ - Changed the type of `mempool_size` in response from `int` to `CLVMCost`(actually `uint64`)
158
+ - [Wallet RPC API](./src/api/rpc/wallet)
159
+ - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
160
+ - Fixed missing export and entry in [README](./src/api/README.md)
161
+ - [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params)
162
+ - Added missing `message` to request parameter
163
+
3
164
  ## [10.0.0]
4
165
  ### Breaking change
5
166
  In `chia/types/mempool_items.py`, `removals` of `MempoolItem` is now flagged as `@property`.
6
167
  As a result of this, `removals` of `MempoolItem` is removed from 2 RPC API responses listed below.
7
168
  - [FullNode RPC API](./src/api/rpc/full_node)
8
- - [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#getallmempoolitemsagent)
9
- - [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#getmempoolitembytxidagent-params)
169
+ - [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#get_all_mempool_itemsagent)
170
+ - [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#get_mempool_item_by_tx_idagent-params)
10
171
  ### Minor breaking change
11
172
  - Response params of`keyring_status` daemon WebSocket API below are deprecated
12
173
  - `needs_migration`
@@ -18,51 +179,51 @@ As a result of this, `removals` of `MempoolItem` is removed from 2 RPC API respo
18
179
  - Removed `notify_keyring_migration_completed`
19
180
  ### Added
20
181
  - [New DataLayer RPC API](./src/api/rpc/data_layer)
21
- - [`get_sync_status`](./src/api/rpc/data_layer/README.md#getsyncstatusagent-params)
182
+ - [`get_sync_status`](./src/api/rpc/data_layer/README.md#get_sync_statusagent-params)
22
183
  - [New Wallet RPC API](./src/api/rpc/wallet)
23
- - [`get_spendable_coins`](./src/api/rpc/wallet/README.md#getspendablecoinsagent-params)
24
- - [`get_coin_records_by_names`](./src/api/rpc/wallet/README.md#getcoinrecordsbynamesagent-params)
25
- - [`verify_signature`](./src/api/rpc/wallet/README.md#verifysignatureagent-params)
26
- - [`did_message_spend`](./src/api/rpc/wallet/README.md#didmessagespendagent-params)
27
- - [`did_get_info`](./src/api/rpc/wallet/README.md#didgetinfoagent-params)
28
- - [`did_find_lost_did`](./src/api/rpc/wallet/README.md#didfindlostdidagent-params)
29
- - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nftsetdidbulkagent-params)
184
+ - [`get_spendable_coins`](./src/api/rpc/wallet/README.md#get_spendable_coinsagent-params)
185
+ - [`get_coin_records_by_names`](./src/api/rpc/wallet/README.md#get_coin_records_by_namesagent-params)
186
+ - [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params)
187
+ - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params)
188
+ - [`did_get_info`](./src/api/rpc/wallet/README.md#did_get_infoagent-params)
189
+ - [`did_find_lost_did`](./src/api/rpc/wallet/README.md#did_find_lost_didagent-params)
190
+ - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
30
191
  ### Changed
31
192
  - [Daemon WebSocket API](./src/api/ws/daemon)
32
- - [`keyring_status`](./src/api/ws/daemon/README.md#keyringstatusdaemon)
193
+ - [`keyring_status`](./src/api/ws/daemon/README.md#keyring_statusdaemon)
33
194
  - Removed `needs_migration` from response
34
195
  - Removed `can_remove_legacy_keys` from response
35
196
  - [FullNode RPC API](./src/api/rpc/full_node)
36
- - [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#getmempoolitembytxidagent-params)
197
+ - [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#get_mempool_item_by_tx_idagent-params)
37
198
  - Added `include_pending` to request parameter
38
199
  - [Wallet RPC API](./src/api/rpc/wallet)
39
- - [`send_transaction`](./src/api/rpc/wallet/README.md#sendtransactionagent-params)
200
+ - [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
40
201
  - Added `max_coin_amount` to request parameter
41
202
  - Added `exclude_coin_amounts` to request parameter
42
203
  - Added `exclude_coin_ids` to request parameter
43
- - [`send_transaction_multi`](./src/api/rpc/wallet/README.md#sendtransactionmultiagent-params)
204
+ - [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params)
44
205
  - Added `max_coin_amount` to request parameter
45
206
  - Added `exclude_coin_amounts` to request parameter
46
207
  - Added parameters for cat spends.
47
- - [`select_coins`](./src/api/rpc/wallet/README.md#selectcoinsagent-params)
208
+ - [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params)
48
209
  - Added `max_coin_amount` to request parameter
49
210
  - Added `exclude_coin_amounts` to request parameter
50
- - [`cat_spend`](./src/api/rpc/wallet/README.md#catspendagent-params)
211
+ - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
51
212
  - Added `additions` to request parameter
52
213
  - Added `max_coin_amount` to request parameter
53
214
  - Added `exclude_coin_amounts` to request parameter
54
215
  - Added `exclude_coin_ids` to request parameter
55
- - [`sign_message_by_id`](./src/api/rpc/wallet/README.md#signmessagebyidagent-params)
216
+ - [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params)
56
217
  - Added `latest_coin_id` to request parameter
57
- - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#createofferforidsagent-params)
218
+ - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idssagent-params)
58
219
  - Added `max_coin_amount` to request parameter
59
- - [`take_offer`](./src/api/rpc/wallet/README.md#takeofferagent-params)
220
+ - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
60
221
  - Added `max_coin_amount` to request parameter
61
- - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nftmintnftagent-params)
222
+ - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params)
62
223
  - Added `nft_id` to return parameter
63
- - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nftmintbulkagent-params)
224
+ - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params)
64
225
  - Added `nft_id_list` to return parameter
65
- - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#createsignedtransactionagent-params)
226
+ - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
66
227
  - Added `max_coin_amount` to return parameter
67
228
  - Added `exclude_coin_amounts` to return parameter
68
229
  - [Wallet WebSocket API](./src/api/ws/wallet)
@@ -101,15 +262,15 @@ res = await daemon.sendMessage("chia_farmer", "get_harvesters_summary");
101
262
  while it is the daemon which chooses the services it connects to if you use Daemon WebSocket channel.
102
263
  ### Fixed
103
264
  - [FullNode RPC API](./src/api/rpc/full_node)
104
- - [`get_blockchain_state`](./src/api/rpc/full_node/README.md#getblockchainstateagent)
265
+ - [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
105
266
  - Made `sync_tip_height` as `uint32`(previously `Optional<uint32>`) because `None` value would never be set
106
267
  - [Wallet RPC API](./src/api/rpc/wallet)
107
- - [`send_transaction_multi`](./src/api/rpc/wallet/README.md#sendtransactionmultiagent-params)
268
+ - [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params)
108
269
  - Added missing `min_coin_amount` to request parameter
109
270
  - Added missing `exclude_coins` to request parameter
110
- - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#createofferforidsagent-params)
271
+ - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
111
272
  - Added missing `solver` to request parameter
112
- - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#createsignedtransactionagent-params)
273
+ - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
113
274
  - Added missing `wallet_id` to return parameter in README
114
275
  - Added missing `exclude_coins` to return parameter in README
115
276
 
@@ -819,6 +980,8 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
819
980
  Initial release.
820
981
 
821
982
  <!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
983
+ [11.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v10.1.0...v11.0.0
984
+ [10.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v10.0.0...v10.1.0
822
985
  [10.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.2.0...v10.0.0
823
986
  [9.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.1.0...v9.2.0
824
987
  [9.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.0.1...v9.1.0
package/README.md CHANGED
@@ -2,7 +2,7 @@
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.6.2`.
5
+ Supports all RPC/Websocket API available at `chia 1.7.1`.
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:
@@ -22,10 +22,10 @@ yarn add chia-agent
22
22
 
23
23
  ## Compatibility
24
24
  This code is compatible with:
25
- - [`ba1ff12b31f8fea600e8ee2058bf472e211f1f7a`](https://github.com/Chia-Network/chia-blockchain/tree/ba1ff12b31f8fea600e8ee2058bf472e211f1f7a) of [chia-blockchain 1.6.2](https://github.com/Chia-Network/chia-blockchain)
26
- - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/ba1ff12b31f8fea600e8ee2058bf472e211f1f7a...main)
27
- - [`41a16695db4c6e032aeb18e0af5ab9f01db864cf`](https://github.com/Chia-Network/pool-reference/tree/41a16695db4c6e032aeb18e0af5ab9f01db864cf) 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/41a16695db4c6e032aeb18e0af5ab9f01db864cf...main)
25
+ - [`ba2570f50fed64be92a49f1342fd0cc3ff014831`](https://github.com/Chia-Network/chia-blockchain/tree/ba2570f50fed64be92a49f1342fd0cc3ff014831) of [chia-blockchain 1.7.1](https://github.com/Chia-Network/chia-blockchain)
26
+ - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/ba2570f50fed64be92a49f1342fd0cc3ff014831...main)
27
+ - [`6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5`](https://github.com/Chia-Network/pool-reference/tree/6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5) 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/6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5...main)
29
29
 
30
30
  ## API
31
31
  There are 2 kinds of APIs in chia.
@@ -1,3 +1 @@
1
- import { str } from "../_python_types_";
2
- export declare type SerializedProgram = str;
3
1
  export declare type Program = unknown;
@@ -0,0 +1,2 @@
1
+ import { str } from "../_python_types_";
2
+ export declare type SerializedProgram = str;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import { Coin } from "./blockchain_format/coin";
2
- import { SerializedProgram } from "./blockchain_format/program";
2
+ import { SerializedProgram } from "./blockchain_format/serialized_program";
3
3
  export declare type CoinSpend = {
4
4
  coin: Coin;
5
5
  puzzle_reveal: SerializedProgram;
@@ -2,8 +2,8 @@ import { EndOfSubSlotBundle } from "./end_of_slot_bundle";
2
2
  import { RewardChainBlock } from "./blockchain_format/reward_chain_block";
3
3
  import { VDFProof } from "./blockchain_format/vdf";
4
4
  import { Foliage, FoliageTransactionBlock, TransactionsInfo } from "./blockchain_format/foliage";
5
- import { SerializedProgram } from "./blockchain_format/program";
6
5
  import { Optional, uint32 } from "./_python_types_";
6
+ import { SerializedProgram } from "./blockchain_format/serialized_program";
7
7
  export declare type FullBlock = {
8
8
  finished_sub_slots: EndOfSubSlotBundle[];
9
9
  reward_chain_block: RewardChainBlock;
@@ -2,13 +2,21 @@ import { SpendBundle } from "./spend_bundle";
2
2
  import { Coin } from "./blockchain_format/coin";
3
3
  import { bytes32 } from "./blockchain_format/sized_bytes";
4
4
  import { NPCResult } from "../consensus/cost_calculator";
5
- import { uint32, uint64 } from "./_python_types_";
5
+ import { Optional, uint32, uint64 } from "./_python_types_";
6
6
  export declare type MempoolItem = {
7
+ spend_bundle: SpendBundle;
8
+ fee: uint64;
9
+ npc_result: NPCResult;
10
+ spend_bundle_name: bytes32;
11
+ height_added_to_mempool: uint32;
12
+ assert_height: Optional<uint32>;
13
+ };
14
+ export declare type MempoolItemInJsonDict = {
7
15
  spend_bundle: SpendBundle;
8
16
  fee: uint64;
9
17
  npc_result: NPCResult;
10
18
  cost: uint64;
11
19
  spend_bundle_name: bytes32;
12
20
  additions: Coin[];
13
- height_added_to_mempool: uint32;
21
+ removals: Coin[];
14
22
  };
@@ -0,0 +1,2 @@
1
+ import { uint64 } from "./_python_types_";
2
+ export declare type Mojos = uint64;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare type CHIP_0002 = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:CHIP-0002_";
2
+ export declare type BLS_MESSAGE_AUGMENTATION_UTF8_INPUT = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:utf8input_";
3
+ export declare type BLS_MESSAGE_AUGMENTATION_HEX_INPUT = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:hexinput_";
4
+ export declare type SigningMode = CHIP_0002 | BLS_MESSAGE_AUGMENTATION_UTF8_INPUT | BLS_MESSAGE_AUGMENTATION_HEX_INPUT;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  import { bool, bytes, Optional, str, uint16, uint32, uint64 } from "../../types/_python_types_";
2
2
  import { bytes32 } from "../../types/blockchain_format/sized_bytes";
3
3
  export declare type NFTInfo = {
4
+ nft_id: str;
4
5
  launcher_id: bytes32;
5
6
  nft_coin_id: bytes32;
6
7
  owner_did: Optional<bytes32>;
@@ -1,4 +1,4 @@
1
- import { str, True, uint16 } from "../../chia/types/_python_types_";
1
+ import { False, str, True, uint16 } from "../../chia/types/_python_types_";
2
2
  import { TRPCAgent } from "../../../rpc/index";
3
3
  import { GetMessageType, ResType, TConnectionGeneral } from "../../types";
4
4
  import { TConnectionFullNode } from "../../ws/full_node/index";
@@ -21,7 +21,12 @@ export declare type TOpenConnectionRequest = {
21
21
  host: str;
22
22
  port: uint16;
23
23
  };
24
- export declare type TOpenConnectionResponse = {};
24
+ export declare type TOpenConnectionResponse = {
25
+ success: False;
26
+ error: str;
27
+ } | {
28
+ success: True;
29
+ };
25
30
  export declare type WsOpenConnectionMessage = GetMessageType<chia_common_service, open_connection_command, TOpenConnectionResponse>;
26
31
  export declare function open_connection<T extends TRPCAgent | TDaemon>(agent: T, params: TOpenConnectionRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TOpenConnectionResponse, WsOpenConnectionMessage>>;
27
32
  export declare const close_connection_command = "close_connection";
@@ -2,10 +2,10 @@ 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 { CoinRecordBackwardCompatible } from "../../chia/types/coin_record";
5
+ import { CoinRecord, 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
- import { MempoolItem } from "../../chia/types/mempool_item";
8
+ import { MempoolItemInJsonDict } from "../../chia/types/mempool_item";
9
9
  import { TRPCAgent } from "../../../rpc";
10
10
  import { EndOfSubSlotBundle } from "../../chia/types/end_of_slot_bundle";
11
11
  import { SignagePoint } from "../../chia/full_node/signage_point";
@@ -32,7 +32,8 @@ export declare type TGetBlockchainStateResponse = {
32
32
  sub_slot_iters: uint64;
33
33
  space: uint128;
34
34
  mempool_size: int;
35
- mempool_cost: int;
35
+ mempool_cost: CLVMCost;
36
+ mempool_fees: int;
36
37
  mempool_min_fees: {
37
38
  cost_5000000: float;
38
39
  };
@@ -293,7 +294,7 @@ export declare const get_all_mempool_items_command = "get_all_mempool_items";
293
294
  export declare type get_all_mempool_items_command = typeof get_all_mempool_items_command;
294
295
  export declare type TGetAllMempoolItemsRequest = {};
295
296
  export declare type TGetAllMempoolItemsResponse = {
296
- mempool_items: Record<string, MempoolItem>;
297
+ mempool_items: Record<string, MempoolItemInJsonDict>;
297
298
  };
298
299
  export declare type WsGetAllMempoolItemsMessage = GetMessageType<chia_full_node_service, get_all_mempool_items_command, TGetAllMempoolItemsResponse>;
299
300
  export declare function get_all_mempool_items<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetAllMempoolItemsResponse, WsGetAllMempoolItemsMessage>>;
@@ -304,7 +305,7 @@ export declare type TGetMempoolItemByTxIdRequest = {
304
305
  include_pending?: bool;
305
306
  };
306
307
  export declare type TGetMempoolItemByTxIdResponse = {
307
- mempool_item: MempoolItem;
308
+ mempool_item: MempoolItemInJsonDict;
308
309
  };
309
310
  export declare type WsGetMempoolItemByTxIdMessage = GetMessageType<chia_full_node_service, get_mempool_item_by_tx_id_command, TGetMempoolItemByTxIdResponse>;
310
311
  export declare function get_mempool_item_by_tx_id<T extends TRPCAgent | TDaemon>(agent: T, data: TGetMempoolItemByTxIdRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetMempoolItemByTxIdResponse, WsGetMempoolItemByTxIdMessage>>;
@@ -313,6 +314,8 @@ export declare type get_fee_estimate_command = typeof get_fee_estimate_command;
313
314
  export declare type TGetFeeEstimateRequest = {
314
315
  spend_bundle?: SpendBundle;
315
316
  cost?: uint64;
317
+ spend_type?: "send_xch_transaction" | "cat_spend" | "take_offer" | "cancel_offer" | "nft_set_nft_did" | "nft_transfer_nft" | "create_new_pool_wallet" | "pw_absorb_rewards" | "create_new_did_wallet";
318
+ spend_count?: uint64;
316
319
  target_times: int[];
317
320
  };
318
321
  export declare type TGetFeeEstimateResponse = {
@@ -320,13 +323,112 @@ export declare type TGetFeeEstimateResponse = {
320
323
  target_times: int[];
321
324
  current_fee_rate: uint64;
322
325
  mempool_size: CLVMCost;
326
+ mempool_fees: int;
327
+ num_spends: int;
323
328
  mempool_max_size: CLVMCost;
324
329
  full_node_synced: bool;
325
330
  peak_height: uint32;
326
331
  last_peak_timestamp: uint64;
327
332
  node_time_utc: int;
333
+ last_block_cost: int;
334
+ fees_last_block: uint64;
335
+ fee_rate_last_block: float;
336
+ last_tx_block_height: int;
328
337
  };
329
338
  export declare type WsGetFeeEstimateMessage = GetMessageType<chia_full_node_service, get_fee_estimate_command, TGetFeeEstimateResponse>;
330
339
  export declare function get_fee_estimate<T extends TRPCAgent | TDaemon>(agent: T, data: TGetFeeEstimateRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetFeeEstimateResponse, WsGetFeeEstimateMessage>>;
331
- export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockSpendsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse | TGetPuzzleAndSolutionResponse | TGetFeeEstimateResponse;
332
- export declare type RpcFullNodeMessageOnWs = WsGetAdditionsAndRemovalsMessage | WsGetAllMempoolItemsMessage | WsGetAllMempoolTxIdsMessage | WsGetBlockMessage | WsGetBlockRecordByHeightMessage | WsGetBlockRecordMessage | WsGetBlockRecordsMessage | WsGetBlockSpendsMessage | WsGetBlockchainStateMessage | WsGetBlocksMessage | WsGetBlockCountMetricsMessage | WsGetRecentSignagePointOrEOSCommandMessage | WsGetCoinRecordByNameMessage | WsGetCoinRecordsByNamesMessage | WsGetCoinRecordsByPuzzleHashMessage | WsGetCoinRecordsByPuzzleHashesMessage | WsGetCoinRecordsByParentIdsMessage | WsGetCoinRecordsByHintMessage | WsGetInitialFreezePeriodMessageOfFullNode | WsGetMempoolItemByTxIdMessage | WsGetNetworkInfoMessageOfFullNode | WsGetNetworkSpaceMessage | WsGetUnfinishedBlockHeadersMessage | WsPushTxMessage | WsGetPuzzleAndSolutionMessage | WsGetFeeEstimateMessage;
340
+ export declare const get_all_blocks_command = "get_all_blocks";
341
+ export declare type get_all_blocks_command = typeof get_all_blocks_command;
342
+ export declare type TGetAllBlocksResponse = {
343
+ blocks: FullBlock[];
344
+ success: bool;
345
+ };
346
+ export declare type WsGetAllBlocksMessage = GetMessageType<chia_full_node_service, get_all_blocks_command, TGetAllBlocksResponse>;
347
+ export declare function get_all_blocks<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetAllBlocksResponse, WsGetAllBlocksMessage>>;
348
+ export declare const farm_block_command = "farm_block";
349
+ export declare type farm_block_command = typeof farm_block_command;
350
+ export declare type TFarmBlockRequest = {
351
+ address: str;
352
+ guarantee_tx_block?: bool;
353
+ blocks?: int;
354
+ };
355
+ export declare type TFarmBlockResponse = {
356
+ new_peak_height: int;
357
+ success: bool;
358
+ };
359
+ export declare type WsFarmBlockMessage = GetMessageType<chia_full_node_service, farm_block_command, TFarmBlockResponse>;
360
+ export declare function farm_block<T extends TRPCAgent | TDaemon>(agent: T, data: TFarmBlockRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TFarmBlockResponse, WsFarmBlockMessage>>;
361
+ export declare const set_auto_farming_command = "set_auto_farming";
362
+ export declare type set_auto_farming_command = typeof set_auto_farming_command;
363
+ export declare type TSetAutoFarmingRequest = {
364
+ auto_farm: bool;
365
+ };
366
+ export declare type TSetAutoFarmingResponse = {
367
+ auto_farm_enabled: bool;
368
+ success: bool;
369
+ };
370
+ export declare type WsSetAutoFarmingMessage = GetMessageType<chia_full_node_service, set_auto_farming_command, TSetAutoFarmingResponse>;
371
+ export declare function set_auto_farming<T extends TRPCAgent | TDaemon>(agent: T, data: TSetAutoFarmingRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TSetAutoFarmingResponse, WsSetAutoFarmingMessage>>;
372
+ export declare const get_auto_farming_command = "get_auto_farming";
373
+ export declare type get_auto_farming_command = typeof get_auto_farming_command;
374
+ export declare type TGetAutoFarmingResponse = {
375
+ new_peak_height: uint64;
376
+ success: bool;
377
+ };
378
+ export declare type WsGetAutoFarmingMessage = GetMessageType<chia_full_node_service, get_auto_farming_command, TGetAutoFarmingResponse>;
379
+ export declare function get_auto_farming<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetAutoFarmingResponse, WsGetAutoFarmingMessage>>;
380
+ export declare const get_farming_ph_command = "get_farming_ph";
381
+ export declare type get_farming_ph_command = typeof get_farming_ph_command;
382
+ export declare type TGetFarmingPhResponse = {
383
+ puzzle_hash: str;
384
+ success: bool;
385
+ };
386
+ export declare type WsGetFarmingPhMessage = GetMessageType<chia_full_node_service, get_farming_ph_command, TGetFarmingPhResponse>;
387
+ export declare function get_farming_ph<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetFarmingPhResponse, WsGetFarmingPhMessage>>;
388
+ export declare const get_all_coins_command = "get_all_coins";
389
+ export declare type get_all_coins_command = typeof get_all_coins_command;
390
+ export declare type TGetAllCoinsRequest = {
391
+ include_spent_coins?: bool;
392
+ };
393
+ export declare type TGetAllCoinsResponse = {
394
+ coin_records: CoinRecord[];
395
+ success: bool;
396
+ };
397
+ export declare type WsGetAllCoinsMessage = GetMessageType<chia_full_node_service, get_all_coins_command, TGetAllCoinsResponse>;
398
+ export declare function get_all_coins<T extends TRPCAgent | TDaemon>(agent: T, data: TGetAllCoinsRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetAllCoinsResponse, WsGetAllCoinsMessage>>;
399
+ export declare const get_all_puzzle_hashes_command = "get_all_puzzle_hashes";
400
+ export declare type get_all_puzzle_hashes_command = typeof get_all_puzzle_hashes_command;
401
+ export declare type TGetAllPuzzleHashesResponse = {
402
+ puzzle_hashes: Record<bytes32, [uint128, int]>;
403
+ success: bool;
404
+ };
405
+ export declare type WsGetAllPuzzleHashesMessage = GetMessageType<chia_full_node_service, get_all_puzzle_hashes_command, TGetAllPuzzleHashesResponse>;
406
+ export declare function get_all_puzzle_hashes<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetAllPuzzleHashesResponse, WsGetAllPuzzleHashesMessage>>;
407
+ export declare const revert_blocks_command = "revert_blocks";
408
+ export declare type revert_blocks_command = typeof revert_blocks_command;
409
+ export declare type TRevertBlocksRequest = {
410
+ num_of_blocks?: int;
411
+ delete_all_blocks?: bool;
412
+ };
413
+ export declare type TRevertBlocksResponse = {
414
+ new_peak_height: int;
415
+ success: bool;
416
+ };
417
+ export declare type WsRevertBlocksMessage = GetMessageType<chia_full_node_service, revert_blocks_command, TRevertBlocksResponse>;
418
+ export declare function revert_blocks<T extends TRPCAgent | TDaemon>(agent: T, data: TRevertBlocksRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TRevertBlocksResponse, WsRevertBlocksMessage>>;
419
+ export declare const reorg_blocks_command = "reorg_blocks";
420
+ export declare type reorg_blocks_command = typeof reorg_blocks_command;
421
+ export declare type TReorgBlocksRequest = {
422
+ num_of_blocks_to_rev?: int;
423
+ num_of_new_blocks?: int;
424
+ revert_all_blocks?: bool;
425
+ random_seed?: str;
426
+ };
427
+ export declare type TReorgBlocksResponse = {
428
+ new_peak_height: int;
429
+ success: bool;
430
+ };
431
+ export declare type WsReorgBlocksMessage = GetMessageType<chia_full_node_service, reorg_blocks_command, TReorgBlocksResponse>;
432
+ export declare function reorg_blocks<T extends TRPCAgent | TDaemon>(agent: T, data: TReorgBlocksRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TReorgBlocksResponse, WsReorgBlocksMessage>>;
433
+ export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockSpendsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse | TGetPuzzleAndSolutionResponse | TGetFeeEstimateResponse | TGetAllBlocksResponse | TFarmBlockResponse | TSetAutoFarmingResponse | TGetAutoFarmingResponse | TGetFarmingPhResponse | TGetAllCoinsResponse | TGetAllPuzzleHashesResponse | TRevertBlocksResponse | TReorgBlocksResponse;
434
+ export declare type RpcFullNodeMessageOnWs = WsGetAdditionsAndRemovalsMessage | WsGetAllMempoolItemsMessage | WsGetAllMempoolTxIdsMessage | WsGetBlockMessage | WsGetBlockRecordByHeightMessage | WsGetBlockRecordMessage | WsGetBlockRecordsMessage | WsGetBlockSpendsMessage | WsGetBlockchainStateMessage | WsGetBlocksMessage | WsGetBlockCountMetricsMessage | WsGetRecentSignagePointOrEOSCommandMessage | WsGetCoinRecordByNameMessage | WsGetCoinRecordsByNamesMessage | WsGetCoinRecordsByPuzzleHashMessage | WsGetCoinRecordsByPuzzleHashesMessage | WsGetCoinRecordsByParentIdsMessage | WsGetCoinRecordsByHintMessage | WsGetInitialFreezePeriodMessageOfFullNode | WsGetMempoolItemByTxIdMessage | WsGetNetworkInfoMessageOfFullNode | WsGetNetworkSpaceMessage | WsGetUnfinishedBlockHeadersMessage | WsPushTxMessage | WsGetPuzzleAndSolutionMessage | WsGetFeeEstimateMessage | WsGetAllBlocksMessage | WsFarmBlockMessage | WsSetAutoFarmingMessage | WsGetAutoFarmingMessage | WsGetFarmingPhMessage | WsGetAllCoinsMessage | WsGetAllPuzzleHashesMessage | WsRevertBlocksMessage | WsReorgBlocksMessage;