chia-agent 10.1.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 +147 -48
- package/README.md +5 -5
- package/api/chia/types/blockchain_format/program.d.ts +0 -2
- package/api/chia/types/blockchain_format/serialized_program.d.ts +2 -0
- package/api/chia/types/blockchain_format/serialized_program.js +2 -0
- package/api/chia/types/coin_spend.d.ts +1 -1
- package/api/chia/types/full_block.d.ts +1 -1
- package/api/chia/types/mempool_item.d.ts +9 -2
- package/api/chia/wallet/nft_wallet/nft_info.d.ts +1 -0
- package/api/rpc/full_node/index.d.ts +101 -9
- package/api/rpc/full_node/index.js +65 -1
- package/api/rpc/index.d.ts +2 -2
- package/api/rpc/index.js +17 -4
- package/api/rpc/wallet/index.d.ts +56 -2
- package/api/rpc/wallet/index.js +26 -5
- package/api/ws/farmer/index.d.ts +13 -3
- package/api/ws/farmer/index.js +32 -3
- package/api/ws/harvester/index.d.ts +14 -4
- package/api/ws/harvester/index.js +27 -1
- package/api/ws/index.d.ts +3 -3
- package/api/ws/index.js +10 -4
- package/api/ws/wallet/index.d.ts +33 -15
- package/api/ws/wallet/index.js +40 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,124 @@
|
|
|
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
|
+
|
|
3
102
|
## [10.1.0]
|
|
4
103
|
### Indirect Change
|
|
5
104
|
In `chia/types/mempool_items.py`, `assert_height` was added to `MempoolItem`.
|
|
6
105
|
As a result of this change, the responses from following RPC APIs are affected.
|
|
7
106
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
8
|
-
- [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#
|
|
9
|
-
- [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#
|
|
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)
|
|
10
109
|
### Added
|
|
11
110
|
- [New Wallet RPC API](./src/api/rpc/wallet)
|
|
12
|
-
- [`get_timestamp_for_height`](./src/api/rpc/wallet/README.md#
|
|
13
|
-
- [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#
|
|
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)
|
|
14
113
|
### Changed
|
|
15
114
|
- [Common RPC API](./src/api/rpc/common)
|
|
16
|
-
- [`open_connection`](./src/api/rpc/common/README.md#
|
|
115
|
+
- [`open_connection`](./src/api/rpc/common/README.md#open_connectionagent-params)
|
|
17
116
|
- Added `success` to response
|
|
18
117
|
- Added `error` to response when `success` is `False`
|
|
19
118
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
20
|
-
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#
|
|
119
|
+
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
|
|
21
120
|
- Added `mempool_fees` to response
|
|
22
|
-
- [`get_fee_estimate`](./src/api/rpc/full_node/README.md#
|
|
121
|
+
- [`get_fee_estimate`](./src/api/rpc/full_node/README.md#get_fee_estimateagent-params)
|
|
23
122
|
- Added `spend_type` to request parameter
|
|
24
123
|
- Added `spend_count` to request parameter
|
|
25
124
|
- Added `mempool_fees` to response
|
|
@@ -29,37 +128,37 @@ As a result of this change, the responses from following RPC APIs are affected.
|
|
|
29
128
|
- Added `fee_rate_last_block` to response
|
|
30
129
|
- Added `last_tx_block_height` to response
|
|
31
130
|
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
32
|
-
- [`get_notifications`](./src/api/rpc/wallet/README.md#
|
|
131
|
+
- [`get_notifications`](./src/api/rpc/wallet/README.md#get_notificationsagent-params)
|
|
33
132
|
- Added `height` to response
|
|
34
|
-
- [`verify_signature`](./src/api/rpc/wallet/README.md#
|
|
133
|
+
- [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params)
|
|
35
134
|
- Added `signing_mode` to request parameter
|
|
36
|
-
- [`sign_message_by_address`](./src/api/rpc/wallet/README.md#
|
|
135
|
+
- [`sign_message_by_address`](./src/api/rpc/wallet/README.md#sign_message_by_addressagent-params)
|
|
37
136
|
- Added `signing_mode` to response
|
|
38
|
-
- [`sign_message_by_id`](./src/api/rpc/wallet/README.md#
|
|
137
|
+
- [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params)
|
|
39
138
|
- Added `None` type to `latest_coin_id` in response
|
|
40
139
|
- Added `signing_mode` to response
|
|
41
|
-
- [`cat_spend`](./src/api/rpc/wallet/README.md#
|
|
140
|
+
- [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
|
|
42
141
|
- Added `coins` to response
|
|
43
|
-
- [`get_offer_summary`](./src/api/rpc/wallet/README.md#
|
|
142
|
+
- [`get_offer_summary`](./src/api/rpc/wallet/README.md#get_offer_summaryagent-params)
|
|
44
143
|
- Added `id` to response
|
|
45
|
-
- [`check_offer_validity`](./src/api/rpc/wallet/README.md#
|
|
144
|
+
- [`check_offer_validity`](./src/api/rpc/wallet/README.md#check_offer_validityagent-params)
|
|
46
145
|
- Added `id` to response
|
|
47
|
-
- [`did_message_spend`](./src/api/rpc/wallet/README.md#
|
|
146
|
+
- [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params)
|
|
48
147
|
- Removed error response
|
|
49
|
-
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#
|
|
148
|
+
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
|
|
50
149
|
- Added `tx_num to response
|
|
51
|
-
- [`nft_get_wallet_did`](./src/api/rpc/wallet/README.md#
|
|
150
|
+
- [`nft_get_wallet_did`](./src/api/rpc/wallet/README.md#nft_get_wallet_didagent-params)
|
|
52
151
|
- Removed error response
|
|
53
|
-
- [`nft_set_nft_status`](./src/api/rpc/wallet/README.md#
|
|
152
|
+
- [`nft_set_nft_status`](./src/api/rpc/wallet/README.md#nft_set_nft_statusagent-params)
|
|
54
153
|
- Removed error response
|
|
55
154
|
### Fixed
|
|
56
155
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
57
|
-
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#
|
|
156
|
+
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
|
|
58
157
|
- Changed the type of `mempool_size` in response from `int` to `CLVMCost`(actually `uint64`)
|
|
59
158
|
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
60
|
-
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#
|
|
159
|
+
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
|
|
61
160
|
- Fixed missing export and entry in [README](./src/api/README.md)
|
|
62
|
-
- [`verify_signature`](./src/api/rpc/wallet/README.md#
|
|
161
|
+
- [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params)
|
|
63
162
|
- Added missing `message` to request parameter
|
|
64
163
|
|
|
65
164
|
## [10.0.0]
|
|
@@ -67,8 +166,8 @@ As a result of this change, the responses from following RPC APIs are affected.
|
|
|
67
166
|
In `chia/types/mempool_items.py`, `removals` of `MempoolItem` is now flagged as `@property`.
|
|
68
167
|
As a result of this, `removals` of `MempoolItem` is removed from 2 RPC API responses listed below.
|
|
69
168
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
70
|
-
- [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#
|
|
71
|
-
- [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#
|
|
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)
|
|
72
171
|
### Minor breaking change
|
|
73
172
|
- Response params of`keyring_status` daemon WebSocket API below are deprecated
|
|
74
173
|
- `needs_migration`
|
|
@@ -80,51 +179,51 @@ As a result of this, `removals` of `MempoolItem` is removed from 2 RPC API respo
|
|
|
80
179
|
- Removed `notify_keyring_migration_completed`
|
|
81
180
|
### Added
|
|
82
181
|
- [New DataLayer RPC API](./src/api/rpc/data_layer)
|
|
83
|
-
- [`get_sync_status`](./src/api/rpc/data_layer/README.md#
|
|
182
|
+
- [`get_sync_status`](./src/api/rpc/data_layer/README.md#get_sync_statusagent-params)
|
|
84
183
|
- [New Wallet RPC API](./src/api/rpc/wallet)
|
|
85
|
-
- [`get_spendable_coins`](./src/api/rpc/wallet/README.md#
|
|
86
|
-
- [`get_coin_records_by_names`](./src/api/rpc/wallet/README.md#
|
|
87
|
-
- [`verify_signature`](./src/api/rpc/wallet/README.md#
|
|
88
|
-
- [`did_message_spend`](./src/api/rpc/wallet/README.md#
|
|
89
|
-
- [`did_get_info`](./src/api/rpc/wallet/README.md#
|
|
90
|
-
- [`did_find_lost_did`](./src/api/rpc/wallet/README.md#
|
|
91
|
-
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#
|
|
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)
|
|
92
191
|
### Changed
|
|
93
192
|
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
94
|
-
- [`keyring_status`](./src/api/ws/daemon/README.md#
|
|
193
|
+
- [`keyring_status`](./src/api/ws/daemon/README.md#keyring_statusdaemon)
|
|
95
194
|
- Removed `needs_migration` from response
|
|
96
195
|
- Removed `can_remove_legacy_keys` from response
|
|
97
196
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
98
|
-
- [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#
|
|
197
|
+
- [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#get_mempool_item_by_tx_idagent-params)
|
|
99
198
|
- Added `include_pending` to request parameter
|
|
100
199
|
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
101
|
-
- [`send_transaction`](./src/api/rpc/wallet/README.md#
|
|
200
|
+
- [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
|
|
102
201
|
- Added `max_coin_amount` to request parameter
|
|
103
202
|
- Added `exclude_coin_amounts` to request parameter
|
|
104
203
|
- Added `exclude_coin_ids` to request parameter
|
|
105
|
-
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#
|
|
204
|
+
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params)
|
|
106
205
|
- Added `max_coin_amount` to request parameter
|
|
107
206
|
- Added `exclude_coin_amounts` to request parameter
|
|
108
207
|
- Added parameters for cat spends.
|
|
109
|
-
- [`select_coins`](./src/api/rpc/wallet/README.md#
|
|
208
|
+
- [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params)
|
|
110
209
|
- Added `max_coin_amount` to request parameter
|
|
111
210
|
- Added `exclude_coin_amounts` to request parameter
|
|
112
|
-
- [`cat_spend`](./src/api/rpc/wallet/README.md#
|
|
211
|
+
- [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
|
|
113
212
|
- Added `additions` to request parameter
|
|
114
213
|
- Added `max_coin_amount` to request parameter
|
|
115
214
|
- Added `exclude_coin_amounts` to request parameter
|
|
116
215
|
- Added `exclude_coin_ids` to request parameter
|
|
117
|
-
- [`sign_message_by_id`](./src/api/rpc/wallet/README.md#
|
|
216
|
+
- [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params)
|
|
118
217
|
- Added `latest_coin_id` to request parameter
|
|
119
|
-
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#
|
|
218
|
+
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idssagent-params)
|
|
120
219
|
- Added `max_coin_amount` to request parameter
|
|
121
|
-
- [`take_offer`](./src/api/rpc/wallet/README.md#
|
|
220
|
+
- [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
|
|
122
221
|
- Added `max_coin_amount` to request parameter
|
|
123
|
-
- [`nft_mint_nft`](./src/api/rpc/wallet/README.md#
|
|
222
|
+
- [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params)
|
|
124
223
|
- Added `nft_id` to return parameter
|
|
125
|
-
- [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#
|
|
224
|
+
- [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params)
|
|
126
225
|
- Added `nft_id_list` to return parameter
|
|
127
|
-
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#
|
|
226
|
+
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
|
|
128
227
|
- Added `max_coin_amount` to return parameter
|
|
129
228
|
- Added `exclude_coin_amounts` to return parameter
|
|
130
229
|
- [Wallet WebSocket API](./src/api/ws/wallet)
|
|
@@ -163,15 +262,15 @@ res = await daemon.sendMessage("chia_farmer", "get_harvesters_summary");
|
|
|
163
262
|
while it is the daemon which chooses the services it connects to if you use Daemon WebSocket channel.
|
|
164
263
|
### Fixed
|
|
165
264
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
166
|
-
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#
|
|
265
|
+
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
|
|
167
266
|
- Made `sync_tip_height` as `uint32`(previously `Optional<uint32>`) because `None` value would never be set
|
|
168
267
|
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
169
|
-
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#
|
|
268
|
+
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params)
|
|
170
269
|
- Added missing `min_coin_amount` to request parameter
|
|
171
270
|
- Added missing `exclude_coins` to request parameter
|
|
172
|
-
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#
|
|
271
|
+
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
|
|
173
272
|
- Added missing `solver` to request parameter
|
|
174
|
-
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#
|
|
273
|
+
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
|
|
175
274
|
- Added missing `wallet_id` to return parameter in README
|
|
176
275
|
- Added missing `exclude_coins` to return parameter in README
|
|
177
276
|
|
|
@@ -881,7 +980,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
881
980
|
Initial release.
|
|
882
981
|
|
|
883
982
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
884
|
-
|
|
983
|
+
[11.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v10.1.0...v11.0.0
|
|
885
984
|
[10.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v10.0.0...v10.1.0
|
|
886
985
|
[10.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.2.0...v10.0.0
|
|
887
986
|
[9.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.1.0...v9.2.0
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://badge.fury.io/js/chia-agent) [](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.7.
|
|
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
|
-
- [`
|
|
26
|
-
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/
|
|
27
|
-
- [`
|
|
28
|
-
- [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { Coin } from "./blockchain_format/coin";
|
|
2
|
-
import { SerializedProgram } from "./blockchain_format/
|
|
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;
|
|
@@ -7,9 +7,16 @@ export declare type MempoolItem = {
|
|
|
7
7
|
spend_bundle: SpendBundle;
|
|
8
8
|
fee: uint64;
|
|
9
9
|
npc_result: NPCResult;
|
|
10
|
-
cost: uint64;
|
|
11
10
|
spend_bundle_name: bytes32;
|
|
12
|
-
additions: Coin[];
|
|
13
11
|
height_added_to_mempool: uint32;
|
|
14
12
|
assert_height: Optional<uint32>;
|
|
15
13
|
};
|
|
14
|
+
export declare type MempoolItemInJsonDict = {
|
|
15
|
+
spend_bundle: SpendBundle;
|
|
16
|
+
fee: uint64;
|
|
17
|
+
npc_result: NPCResult;
|
|
18
|
+
cost: uint64;
|
|
19
|
+
spend_bundle_name: bytes32;
|
|
20
|
+
additions: Coin[];
|
|
21
|
+
removals: Coin[];
|
|
22
|
+
};
|
|
@@ -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>;
|
|
@@ -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 {
|
|
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";
|
|
@@ -13,7 +13,6 @@ import { CoinSpend } from "../../chia/types/coin_spend";
|
|
|
13
13
|
import { CLVMCost } from "../../chia/types/clvm_cost";
|
|
14
14
|
import { GetMessageType, ResType } from "../../types";
|
|
15
15
|
import { TDaemon } from "../../../daemon/index";
|
|
16
|
-
import { Mojos } from "../../chia/types/mojos";
|
|
17
16
|
export declare const chia_full_node_service = "chia_full_node";
|
|
18
17
|
export declare type chia_full_node_service = typeof chia_full_node_service;
|
|
19
18
|
export declare const get_blockchain_state_command = "get_blockchain_state";
|
|
@@ -34,7 +33,7 @@ export declare type TGetBlockchainStateResponse = {
|
|
|
34
33
|
space: uint128;
|
|
35
34
|
mempool_size: int;
|
|
36
35
|
mempool_cost: CLVMCost;
|
|
37
|
-
mempool_fees:
|
|
36
|
+
mempool_fees: int;
|
|
38
37
|
mempool_min_fees: {
|
|
39
38
|
cost_5000000: float;
|
|
40
39
|
};
|
|
@@ -295,7 +294,7 @@ export declare const get_all_mempool_items_command = "get_all_mempool_items";
|
|
|
295
294
|
export declare type get_all_mempool_items_command = typeof get_all_mempool_items_command;
|
|
296
295
|
export declare type TGetAllMempoolItemsRequest = {};
|
|
297
296
|
export declare type TGetAllMempoolItemsResponse = {
|
|
298
|
-
mempool_items: Record<string,
|
|
297
|
+
mempool_items: Record<string, MempoolItemInJsonDict>;
|
|
299
298
|
};
|
|
300
299
|
export declare type WsGetAllMempoolItemsMessage = GetMessageType<chia_full_node_service, get_all_mempool_items_command, TGetAllMempoolItemsResponse>;
|
|
301
300
|
export declare function get_all_mempool_items<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetAllMempoolItemsResponse, WsGetAllMempoolItemsMessage>>;
|
|
@@ -306,7 +305,7 @@ export declare type TGetMempoolItemByTxIdRequest = {
|
|
|
306
305
|
include_pending?: bool;
|
|
307
306
|
};
|
|
308
307
|
export declare type TGetMempoolItemByTxIdResponse = {
|
|
309
|
-
mempool_item:
|
|
308
|
+
mempool_item: MempoolItemInJsonDict;
|
|
310
309
|
};
|
|
311
310
|
export declare type WsGetMempoolItemByTxIdMessage = GetMessageType<chia_full_node_service, get_mempool_item_by_tx_id_command, TGetMempoolItemByTxIdResponse>;
|
|
312
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>>;
|
|
@@ -324,7 +323,7 @@ export declare type TGetFeeEstimateResponse = {
|
|
|
324
323
|
target_times: int[];
|
|
325
324
|
current_fee_rate: uint64;
|
|
326
325
|
mempool_size: CLVMCost;
|
|
327
|
-
mempool_fees:
|
|
326
|
+
mempool_fees: int;
|
|
328
327
|
num_spends: int;
|
|
329
328
|
mempool_max_size: CLVMCost;
|
|
330
329
|
full_node_synced: bool;
|
|
@@ -338,5 +337,98 @@ export declare type TGetFeeEstimateResponse = {
|
|
|
338
337
|
};
|
|
339
338
|
export declare type WsGetFeeEstimateMessage = GetMessageType<chia_full_node_service, get_fee_estimate_command, TGetFeeEstimateResponse>;
|
|
340
339
|
export declare function get_fee_estimate<T extends TRPCAgent | TDaemon>(agent: T, data: TGetFeeEstimateRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetFeeEstimateResponse, WsGetFeeEstimateMessage>>;
|
|
341
|
-
export declare
|
|
342
|
-
export declare type
|
|
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;
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
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_spends = exports.get_block_spends_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
|
-
exports.get_fee_estimate = exports.get_fee_estimate_command = exports.get_mempool_item_by_tx_id = void 0;
|
|
13
|
+
exports.reorg_blocks = exports.reorg_blocks_command = exports.revert_blocks = exports.revert_blocks_command = exports.get_all_puzzle_hashes = exports.get_all_puzzle_hashes_command = exports.get_all_coins = exports.get_all_coins_command = exports.get_farming_ph = exports.get_farming_ph_command = exports.get_auto_farming = exports.get_auto_farming_command = exports.set_auto_farming = exports.set_auto_farming_command = exports.farm_block = exports.farm_block_command = exports.get_all_blocks = exports.get_all_blocks_command = exports.get_fee_estimate = exports.get_fee_estimate_command = exports.get_mempool_item_by_tx_id = void 0;
|
|
14
14
|
exports.chia_full_node_service = "chia_full_node";
|
|
15
15
|
exports.get_blockchain_state_command = "get_blockchain_state";
|
|
16
16
|
function get_blockchain_state(agent) {
|
|
@@ -194,3 +194,67 @@ function get_fee_estimate(agent, data) {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
exports.get_fee_estimate = get_fee_estimate;
|
|
197
|
+
// simulator RPCs
|
|
198
|
+
exports.get_all_blocks_command = "get_all_blocks";
|
|
199
|
+
function get_all_blocks(agent) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.get_all_blocks_command);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
exports.get_all_blocks = get_all_blocks;
|
|
205
|
+
exports.farm_block_command = "farm_block";
|
|
206
|
+
function farm_block(agent, data) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.farm_block_command, data);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
exports.farm_block = farm_block;
|
|
212
|
+
exports.set_auto_farming_command = "set_auto_farming";
|
|
213
|
+
function set_auto_farming(agent, data) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.set_auto_farming_command, data);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
exports.set_auto_farming = set_auto_farming;
|
|
219
|
+
exports.get_auto_farming_command = "get_auto_farming";
|
|
220
|
+
function get_auto_farming(agent) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.get_auto_farming_command);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
exports.get_auto_farming = get_auto_farming;
|
|
226
|
+
exports.get_farming_ph_command = "get_farming_ph";
|
|
227
|
+
function get_farming_ph(agent) {
|
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.get_farming_ph_command);
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
exports.get_farming_ph = get_farming_ph;
|
|
233
|
+
exports.get_all_coins_command = "get_all_coins";
|
|
234
|
+
function get_all_coins(agent, data) {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.get_all_coins_command, data);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
exports.get_all_coins = get_all_coins;
|
|
240
|
+
exports.get_all_puzzle_hashes_command = "get_all_puzzle_hashes";
|
|
241
|
+
function get_all_puzzle_hashes(agent) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.get_all_puzzle_hashes_command);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
exports.get_all_puzzle_hashes = get_all_puzzle_hashes;
|
|
247
|
+
exports.revert_blocks_command = "revert_blocks";
|
|
248
|
+
function revert_blocks(agent, data) {
|
|
249
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
250
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.revert_blocks_command, data);
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
exports.revert_blocks = revert_blocks;
|
|
254
|
+
exports.reorg_blocks_command = "reorg_blocks";
|
|
255
|
+
function reorg_blocks(agent, data) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.reorg_blocks_command, data);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
exports.reorg_blocks = reorg_blocks;
|