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.
- package/CHANGELOG.md +177 -0
- package/README.md +9 -13
- package/api/chia/consensus/blockchain.d.ts +1 -0
- package/api/chia/{types/condition_with_args.js → consensus/blockchain.js} +0 -0
- package/api/chia/consensus/cost_calculator.d.ts +3 -3
- package/api/chia/farmer/farmer.d.ts +1 -0
- package/api/chia/harvester/harvester.d.ts +2 -3
- package/api/chia/plot-sync/receiver.d.ts +22 -0
- package/api/chia/{types/name_puzzle_condition.js → plot-sync/receiver.js} +0 -0
- package/api/chia/pools/pool_config.d.ts +0 -1
- package/api/chia/protocols/harvester_protocol.d.ts +0 -5
- package/api/chia/server/outbound_message.d.ts +1 -0
- package/api/chia/{wallet/util/backup_utils.js → server/outbound_message.js} +0 -0
- package/api/chia/timelord/types.d.ts +1 -0
- package/api/chia/{wallet/util/trade_utils.js → timelord/types.js} +0 -0
- package/api/chia/types/coin_record.d.ts +3 -1
- package/api/chia/types/spend_bundle_condition.d.ts +18 -0
- package/api/chia/types/spend_bundle_condition.js +2 -0
- package/api/chia/wallet/cat_wallet/cat_constants.d.ts +6 -0
- package/api/chia/wallet/cat_wallet/cat_constants.js +2 -0
- package/api/chia/wallet/trade_record.d.ts +24 -0
- package/api/chia/wallet/trade_record.js +1 -0
- package/api/chia/wallet/transaction_record.d.ts +7 -2
- package/api/chia/wallet/util/wallet_types.d.ts +1 -1
- package/api/chia/wallet/util/wallet_types.js +1 -1
- package/api/rpc/common/index.d.ts +40 -0
- package/api/rpc/common/index.js +48 -0
- package/api/rpc/crawler/index.d.ts +29 -0
- package/api/rpc/crawler/index.js +27 -0
- package/api/rpc/farmer/index.d.ts +82 -10
- package/api/rpc/farmer/index.js +36 -1
- package/api/rpc/full_node/index.d.ts +39 -8
- package/api/rpc/full_node/index.js +21 -1
- package/api/rpc/index.d.ts +16 -10
- package/api/rpc/index.js +42 -12
- package/api/rpc/wallet/index.d.ts +198 -114
- package/api/rpc/wallet/index.js +98 -49
- package/api/types.d.ts +16 -0
- package/api/types.js +2 -1
- package/api/ws/crawler/index.d.ts +25 -0
- package/api/ws/crawler/index.js +40 -0
- package/api/ws/daemon/index.d.ts +8 -0
- package/api/ws/daemon/index.js +9 -2
- package/api/ws/farmer/index.d.ts +20 -8
- package/api/ws/farmer/index.js +31 -5
- package/api/ws/full_node/index.d.ts +50 -4
- package/api/ws/full_node/index.js +40 -1
- package/api/ws/harvester/index.d.ts +9 -3
- package/api/ws/harvester/index.js +14 -1
- package/api/ws/index.d.ts +22 -16
- package/api/ws/index.js +54 -33
- package/api/ws/timelord/index.d.ts +38 -0
- package/api/ws/timelord/index.js +66 -0
- package/api/ws/wallet/index.d.ts +32 -6
- package/api/ws/wallet/index.js +42 -3
- package/daemon/connection.d.ts +2 -2
- package/daemon/index.d.ts +6 -6
- package/index.d.ts +0 -2
- package/package.json +2 -2
- package/api/chia/types/condition_opcodes.d.ts +0 -20
- package/api/chia/types/condition_opcodes.js +0 -31
- package/api/chia/types/condition_with_args.d.ts +0 -6
- package/api/chia/types/name_puzzle_condition.d.ts +0 -8
- package/api/chia/wallet/util/backup_utils.d.ts +0 -25
- package/api/chia/wallet/util/trade_utils.d.ts +0 -11
package/api/rpc/wallet/index.js
CHANGED
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = void 0;
|
|
12
|
+
exports.get_farmed_amount_command = exports.get_transaction_count = exports.get_transaction_count_command = exports.send_transaction_multi = exports.send_transaction_multi_command = exports.send_transaction = exports.send_transaction_command = exports.get_next_address = exports.get_next_address_command = exports.get_transactions = exports.get_transactions_command = exports.get_transaction = exports.get_transaction_command = exports.get_wallet_balance = exports.get_wallet_balance_command = exports.create_new_wallet = exports.create_new_wallet_command = exports.get_wallets = exports.get_wallets_command = exports.get_network_info_of_wallet = exports.get_network_info_command_of_wallet = exports.get_initial_freeze_period_of_wallet = exports.get_initial_freeze_period_command_of_wallet = exports.farm_block = exports.farm_block_command = exports.push_tx = exports.push_tx_command = exports.get_height_info = exports.get_height_info_command = exports.get_sync_status = exports.get_sync_status_command = exports.delete_all_keys = exports.delete_all_keys_command = exports.check_delete_key = exports.check_delete_key_command = exports.delete_key = exports.delete_key_command = exports.add_key = exports.add_key_command = exports.generate_mnemonic = exports.generate_mnemonic_command = exports.get_private_key = exports.get_private_key_command = exports.get_public_keys = exports.get_public_keys_command = exports.get_logged_in_fingerprint = exports.get_logged_in_fingerprint_command = exports.log_in = exports.log_in_command = exports.chia_wallet_service = void 0;
|
|
13
|
+
exports.did_create_attest_command = exports.did_get_recovery_list = exports.did_get_recovery_list_command = exports.did_recovery_spend = exports.did_recovery_spend_command = exports.did_get_did = exports.did_get_did_command = exports.did_get_pubkey = exports.did_get_pubkey_command = exports.did_spend = exports.did_spend_command = exports.did_update_recovery_ids = exports.did_update_recovery_ids_command = exports.get_cat_list = exports.get_cat_list_command = exports.cancel_offer = exports.cancel_offer_command = exports.get_offers_count = exports.get_offers_count_command = exports.get_all_offers = exports.get_all_offers_command = exports.get_offer = exports.get_offer_command = exports.take_offer = exports.take_offer_command = exports.check_offer_validity = exports.check_offer_validity_command = exports.get_offer_summary = exports.get_offer_summary_command = exports.create_offer_for_ids = exports.create_offer_for_ids_command = exports.cat_get_asset_id = exports.cat_get_asset_id_command = exports.cat_spend = exports.cat_spend_command = exports.get_stray_cats = exports.get_stray_cats_command = exports.cat_get_name = exports.cat_get_name_command = exports.cat_asset_id_to_name = exports.cat_asset_id_to_name_command = exports.cat_set_name = exports.cat_set_name_command = exports.select_coins = exports.select_coins_command = exports.delete_unconfirmed_transactions = exports.delete_unconfirmed_transactions_command = exports.create_signed_transaction = exports.create_signed_transaction_command = exports.get_farmed_amount = void 0;
|
|
14
|
+
exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = exports.pw_self_pool_command = exports.pw_join_pool = exports.pw_join_pool_command = exports.add_rate_limited_funds = exports.add_rate_limited_funds_command = exports.send_clawback_transaction = exports.send_clawback_transaction_command = exports.rl_set_user_info = exports.rl_set_user_info_command = exports.did_create_backup_file = exports.did_create_backup_file_command = exports.did_get_information_needed_for_recovery = exports.did_get_information_needed_for_recovery_command = exports.did_create_attest = void 0;
|
|
15
15
|
exports.chia_wallet_service = "chia_wallet";
|
|
16
16
|
// # Key management
|
|
17
17
|
exports.log_in_command = "log_in";
|
|
@@ -21,6 +21,13 @@ function log_in(agent, data) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
exports.log_in = log_in;
|
|
24
|
+
exports.get_logged_in_fingerprint_command = "get_logged_in_fingerprint";
|
|
25
|
+
function get_logged_in_fingerprint(agent) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_logged_in_fingerprint_command);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.get_logged_in_fingerprint = get_logged_in_fingerprint;
|
|
24
31
|
exports.get_public_keys_command = "get_public_keys";
|
|
25
32
|
function get_public_keys(agent) {
|
|
26
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -85,6 +92,13 @@ function get_height_info(agent) {
|
|
|
85
92
|
});
|
|
86
93
|
}
|
|
87
94
|
exports.get_height_info = get_height_info;
|
|
95
|
+
exports.push_tx_command = "push_tx";
|
|
96
|
+
function push_tx(agent, data) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.push_tx_command, data);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
exports.push_tx = push_tx;
|
|
88
102
|
exports.farm_block_command = "farm_block";
|
|
89
103
|
function farm_block(agent, data) {
|
|
90
104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -108,9 +122,9 @@ function get_network_info_of_wallet(agent) {
|
|
|
108
122
|
exports.get_network_info_of_wallet = get_network_info_of_wallet;
|
|
109
123
|
// # Wallet management
|
|
110
124
|
exports.get_wallets_command = "get_wallets";
|
|
111
|
-
function get_wallets(agent) {
|
|
125
|
+
function get_wallets(agent, data) {
|
|
112
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.get_wallets_command);
|
|
127
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_wallets_command, data);
|
|
114
128
|
});
|
|
115
129
|
}
|
|
116
130
|
exports.get_wallets = get_wallets;
|
|
@@ -164,13 +178,6 @@ function send_transaction_multi(agent, data) {
|
|
|
164
178
|
});
|
|
165
179
|
}
|
|
166
180
|
exports.send_transaction_multi = send_transaction_multi;
|
|
167
|
-
exports.create_backup_command = "create_backup";
|
|
168
|
-
function create_backup(agent, data) {
|
|
169
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.create_backup_command, data);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
exports.create_backup = create_backup;
|
|
174
181
|
exports.get_transaction_count_command = "get_transaction_count";
|
|
175
182
|
function get_transaction_count(agent, data) {
|
|
176
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -199,35 +206,56 @@ function delete_unconfirmed_transactions(agent, data) {
|
|
|
199
206
|
});
|
|
200
207
|
}
|
|
201
208
|
exports.delete_unconfirmed_transactions = delete_unconfirmed_transactions;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
function cc_set_name(agent, data) {
|
|
209
|
+
exports.select_coins_command = "select_coins";
|
|
210
|
+
function select_coins(agent, data) {
|
|
205
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
212
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.select_coins_command, data);
|
|
207
213
|
});
|
|
208
214
|
}
|
|
209
|
-
exports.
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
exports.select_coins = select_coins;
|
|
216
|
+
// # CATs and Trading
|
|
217
|
+
exports.cat_set_name_command = "cat_set_name";
|
|
218
|
+
function cat_set_name(agent, data) {
|
|
212
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
220
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cat_set_name_command, data);
|
|
214
221
|
});
|
|
215
222
|
}
|
|
216
|
-
exports.
|
|
217
|
-
exports.
|
|
218
|
-
function
|
|
223
|
+
exports.cat_set_name = cat_set_name;
|
|
224
|
+
exports.cat_asset_id_to_name_command = "cat_asset_id_to_name";
|
|
225
|
+
function cat_asset_id_to_name(agent, data) {
|
|
219
226
|
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
227
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cat_asset_id_to_name_command, data);
|
|
221
228
|
});
|
|
222
229
|
}
|
|
223
|
-
exports.
|
|
224
|
-
exports.
|
|
225
|
-
function
|
|
230
|
+
exports.cat_asset_id_to_name = cat_asset_id_to_name;
|
|
231
|
+
exports.cat_get_name_command = "cat_get_name";
|
|
232
|
+
function cat_get_name(agent, data) {
|
|
226
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
234
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cat_get_name_command, data);
|
|
228
235
|
});
|
|
229
236
|
}
|
|
230
|
-
exports.
|
|
237
|
+
exports.cat_get_name = cat_get_name;
|
|
238
|
+
exports.get_stray_cats_command = "get_stray_cats";
|
|
239
|
+
function get_stray_cats(agent) {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_stray_cats_command);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
exports.get_stray_cats = get_stray_cats;
|
|
245
|
+
exports.cat_spend_command = "cat_spend";
|
|
246
|
+
function cat_spend(agent, data) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cat_spend_command, data);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
exports.cat_spend = cat_spend;
|
|
252
|
+
exports.cat_get_asset_id_command = "cat_get_asset_id";
|
|
253
|
+
function cat_get_asset_id(agent, data) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cat_get_asset_id_command, data);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
exports.cat_get_asset_id = cat_get_asset_id;
|
|
231
259
|
exports.create_offer_for_ids_command = "create_offer_for_ids";
|
|
232
260
|
function create_offer_for_ids(agent, data) {
|
|
233
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -235,41 +263,62 @@ function create_offer_for_ids(agent, data) {
|
|
|
235
263
|
});
|
|
236
264
|
}
|
|
237
265
|
exports.create_offer_for_ids = create_offer_for_ids;
|
|
238
|
-
exports.
|
|
239
|
-
function
|
|
266
|
+
exports.get_offer_summary_command = "get_offer_summary";
|
|
267
|
+
function get_offer_summary(agent, data) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_offer_summary_command, data);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
exports.get_offer_summary = get_offer_summary;
|
|
273
|
+
exports.check_offer_validity_command = "check_offer_validity";
|
|
274
|
+
function check_offer_validity(agent, data) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.check_offer_validity_command, data);
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
exports.check_offer_validity = check_offer_validity;
|
|
280
|
+
exports.take_offer_command = "take_offer";
|
|
281
|
+
function take_offer(agent, data) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.take_offer_command, data);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
exports.take_offer = take_offer;
|
|
287
|
+
exports.get_offer_command = "get_offer";
|
|
288
|
+
function get_offer(agent, data) {
|
|
240
289
|
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
290
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_offer_command, data);
|
|
242
291
|
});
|
|
243
292
|
}
|
|
244
|
-
exports.
|
|
245
|
-
exports.
|
|
246
|
-
function
|
|
293
|
+
exports.get_offer = get_offer;
|
|
294
|
+
exports.get_all_offers_command = "get_all_offers";
|
|
295
|
+
function get_all_offers(agent, data) {
|
|
247
296
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
297
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_all_offers_command, data);
|
|
249
298
|
});
|
|
250
299
|
}
|
|
251
|
-
exports.
|
|
252
|
-
exports.
|
|
253
|
-
function
|
|
300
|
+
exports.get_all_offers = get_all_offers;
|
|
301
|
+
exports.get_offers_count_command = "get_offers_count";
|
|
302
|
+
function get_offers_count(agent) {
|
|
254
303
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
304
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_offers_count_command);
|
|
256
305
|
});
|
|
257
306
|
}
|
|
258
|
-
exports.
|
|
259
|
-
exports.
|
|
260
|
-
function
|
|
307
|
+
exports.get_offers_count = get_offers_count;
|
|
308
|
+
exports.cancel_offer_command = "cancel_offer";
|
|
309
|
+
function cancel_offer(agent, data) {
|
|
261
310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
311
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cancel_offer_command, data);
|
|
263
312
|
});
|
|
264
313
|
}
|
|
265
|
-
exports.
|
|
266
|
-
exports.
|
|
267
|
-
function
|
|
314
|
+
exports.cancel_offer = cancel_offer;
|
|
315
|
+
exports.get_cat_list_command = "get_cat_list";
|
|
316
|
+
function get_cat_list(agent) {
|
|
268
317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
-
return agent.sendMessage(exports.chia_wallet_service, exports.
|
|
318
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_cat_list_command);
|
|
270
319
|
});
|
|
271
320
|
}
|
|
272
|
-
exports.
|
|
321
|
+
exports.get_cat_list = get_cat_list;
|
|
273
322
|
// # DID Wallet
|
|
274
323
|
exports.did_update_recovery_ids_command = "did_update_recovery_ids";
|
|
275
324
|
function did_update_recovery_ids(agent, data) {
|
package/api/types.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { NodeType } from "./chia/server/outbound_message";
|
|
2
|
+
import { float, int, str, uint16 } from "./chia/types/_python_types_";
|
|
3
|
+
import { bytes32 } from "./chia/types/blockchain_format/sized_bytes";
|
|
1
4
|
export declare type GetMessageType<O extends string, C extends string, D> = {
|
|
2
5
|
origin: O;
|
|
3
6
|
command: C;
|
|
@@ -7,3 +10,16 @@ export declare type GetMessageType<O extends string, C extends string, D> = {
|
|
|
7
10
|
destination: string;
|
|
8
11
|
};
|
|
9
12
|
export declare const wallet_ui_service = "wallet_ui";
|
|
13
|
+
export declare const metrics_service = "metrics";
|
|
14
|
+
export declare type TConnectionGeneral = {
|
|
15
|
+
type: NodeType;
|
|
16
|
+
local_port: int;
|
|
17
|
+
peer_host: str;
|
|
18
|
+
peer_port: uint16;
|
|
19
|
+
peer_server_port?: uint16;
|
|
20
|
+
node_id: bytes32;
|
|
21
|
+
creation_time: float;
|
|
22
|
+
bytes_read: int;
|
|
23
|
+
bytes_written: int;
|
|
24
|
+
last_message_time: float;
|
|
25
|
+
};
|
package/api/types.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
2
|
+
import { int, str, uint64 } from "../../chia/types/_python_types_";
|
|
3
|
+
import { TDaemon } from "../../../daemon/index";
|
|
4
|
+
import { GetMessageType } from "../../types";
|
|
5
|
+
export declare const chia_crawler_service = "chia_crawler";
|
|
6
|
+
export declare type chia_crawler_service = typeof chia_crawler_service;
|
|
7
|
+
export declare type TPeerCounts = {
|
|
8
|
+
total_last_5_days: int;
|
|
9
|
+
reliable_nodes: int;
|
|
10
|
+
ipv4_last_5_days: bytes32;
|
|
11
|
+
ipv6_last_5_days: uint64;
|
|
12
|
+
versions: Record<str, int>;
|
|
13
|
+
};
|
|
14
|
+
export declare const loaded_initial_peers_command = "loaded_initial_peers";
|
|
15
|
+
export declare type loaded_initial_peers_command = typeof loaded_initial_peers_command;
|
|
16
|
+
export declare type TLoadedInitialPeersBroadCast = {
|
|
17
|
+
peer_counts: TPeerCounts;
|
|
18
|
+
};
|
|
19
|
+
export declare function on_loaded_initial_peers(daemon: TDaemon, callback: (e: GetMessageType<chia_crawler_service, loaded_initial_peers_command, TLoadedInitialPeersBroadCast>) => unknown): Promise<() => void>;
|
|
20
|
+
export declare const crawl_batch_completed_command = "crawl_batch_completed";
|
|
21
|
+
export declare type crawl_batch_completed_command = typeof crawl_batch_completed_command;
|
|
22
|
+
export declare type TCrawlBatchCompletedBroadCast = {
|
|
23
|
+
peer_counts: TPeerCounts;
|
|
24
|
+
};
|
|
25
|
+
export declare function on_crawl_batch_completed(daemon: TDaemon, callback: (e: GetMessageType<chia_crawler_service, crawl_batch_completed_command, TCrawlBatchCompletedBroadCast>) => unknown): Promise<() => void>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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.on_crawl_batch_completed = exports.crawl_batch_completed_command = exports.on_loaded_initial_peers = exports.loaded_initial_peers_command = exports.chia_crawler_service = void 0;
|
|
13
|
+
const types_1 = require("../../types");
|
|
14
|
+
exports.chia_crawler_service = "chia_crawler";
|
|
15
|
+
exports.loaded_initial_peers_command = "loaded_initial_peers";
|
|
16
|
+
function on_loaded_initial_peers(daemon, callback) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
yield daemon.subscribe(types_1.metrics_service);
|
|
19
|
+
const messageListener = (e) => {
|
|
20
|
+
if (e.origin === exports.chia_crawler_service && e.command === exports.loaded_initial_peers_command) {
|
|
21
|
+
callback(e);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return daemon.addMessageListener(exports.chia_crawler_service, messageListener);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.on_loaded_initial_peers = on_loaded_initial_peers;
|
|
28
|
+
exports.crawl_batch_completed_command = "crawl_batch_completed";
|
|
29
|
+
function on_crawl_batch_completed(daemon, callback) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
yield daemon.subscribe(types_1.metrics_service);
|
|
32
|
+
const messageListener = (e) => {
|
|
33
|
+
if (e.origin === exports.chia_crawler_service && e.command === exports.crawl_batch_completed_command) {
|
|
34
|
+
callback(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return daemon.addMessageListener(exports.chia_crawler_service, messageListener);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.on_crawl_batch_completed = on_crawl_batch_completed;
|
package/api/ws/daemon/index.d.ts
CHANGED
|
@@ -339,6 +339,14 @@ export declare type TGetStatusResponse = {
|
|
|
339
339
|
genesis_initialized: True;
|
|
340
340
|
};
|
|
341
341
|
export declare function get_status(daemon: TDaemon): Promise<GetMessageType<"daemon", "get_status", TGetStatusResponse>>;
|
|
342
|
+
export declare const get_version_command = "get_version";
|
|
343
|
+
export declare type get_version_command = typeof get_version_command;
|
|
344
|
+
export declare type TGetVersionRequest = {};
|
|
345
|
+
export declare type TGetVersionResponse = {
|
|
346
|
+
success: bool;
|
|
347
|
+
version: string;
|
|
348
|
+
};
|
|
349
|
+
export declare function get_version(daemon: TDaemon): Promise<GetMessageType<"daemon", "get_version", TGetVersionResponse>>;
|
|
342
350
|
export declare const get_plotters_command = "get_plotters";
|
|
343
351
|
export declare type get_plotters_command = typeof get_plotters_command;
|
|
344
352
|
export declare type TGetPlottersRequest = {};
|
package/api/ws/daemon/index.js
CHANGED
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.on_keyring_status_changed = exports.keyring_status_changed_command = exports.get_plotters = void 0;
|
|
12
|
+
exports.get_version_command = exports.get_status = exports.get_status_command = exports.register_service = exports.register_service_command = exports.exit = exports.exit_command = exports.notify_keyring_migration_completed = exports.notify_keyring_migration_completed_command = exports.remove_keyring_passphrase = exports.remove_keyring_passphrase_command = exports.set_keyring_passphrase = exports.set_keyring_passphrase_command = exports.migrate_keyring = exports.migrate_keyring_command = exports.validate_keyring_passphrase = exports.validate_keyring_passphrase_command = exports.unlock_keyring = exports.unlock_keyring_command = exports.keyring_status = exports.keyring_status_command = exports.is_keyring_locked = exports.is_keyring_locked_command = exports.get_key_for_fingerprint = exports.get_key_for_fingerprint_command = exports.get_first_private_key = exports.get_first_private_key_command = exports.get_all_private_keys = exports.get_all_private_keys_command = exports.delete_key_by_fingerprint = exports.delete_key_by_fingerprint_command = exports.delete_all_keys = exports.delete_all_keys_command = exports.check_keys = exports.check_keys_command = exports.add_private_key = exports.add_private_key_command = exports.is_running = exports.is_running_command = exports.stop_service = exports.stop_service_command = exports.stop_plotting = exports.stop_plotting_command = exports.start_plotting = exports.start_plotting_command = exports.start_service = exports.start_service_command = exports.ping = exports.ping_command = exports.daemon_service = void 0;
|
|
13
|
+
exports.on_keyring_status_changed = exports.keyring_status_changed_command = exports.get_plotters = exports.get_plotters_command = exports.get_version = void 0;
|
|
14
14
|
// The daemon service currently does not provide state_change event as of v1.1.5.
|
|
15
15
|
const types_1 = require("../../types");
|
|
16
16
|
exports.daemon_service = "daemon";
|
|
@@ -182,6 +182,13 @@ function get_status(daemon) {
|
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
exports.get_status = get_status;
|
|
185
|
+
exports.get_version_command = "get_version";
|
|
186
|
+
function get_version(daemon) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
return daemon.sendMessage(exports.daemon_service, exports.get_version_command);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
exports.get_version = get_version;
|
|
185
192
|
exports.get_plotters_command = "get_plotters";
|
|
186
193
|
function get_plotters(daemon) {
|
|
187
194
|
return __awaiter(this, void 0, void 0, function* () {
|
package/api/ws/farmer/index.d.ts
CHANGED
|
@@ -3,10 +3,16 @@ import { NewSignagePoint } from "../../chia/protocols/farmer_protocol";
|
|
|
3
3
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
4
4
|
import { uint32, uint64 } from "../../chia/types/_python_types_";
|
|
5
5
|
import { TDaemon } from "../../../daemon/index";
|
|
6
|
-
import { GetMessageType } from "../../types";
|
|
7
|
-
import {
|
|
6
|
+
import { GetMessageType, TConnectionGeneral } from "../../types";
|
|
7
|
+
import { Receiver } from "../../chia/plot-sync/receiver";
|
|
8
8
|
export declare const chia_farmer_service = "chia_farmer";
|
|
9
9
|
export declare type chia_farmer_service = typeof chia_farmer_service;
|
|
10
|
+
export declare const get_connections_command = "get_connections";
|
|
11
|
+
export declare type get_connections_command = typeof get_connections_command;
|
|
12
|
+
export declare type TGetConnectionsBroadCast = {
|
|
13
|
+
connections: TConnectionGeneral[];
|
|
14
|
+
};
|
|
15
|
+
export declare function on_get_connections(daemon: TDaemon, callback: (e: GetMessageType<chia_farmer_service, get_connections_command, TGetConnectionsBroadCast>) => unknown): Promise<() => void>;
|
|
10
16
|
export declare const new_farming_info_command = "new_farming_info";
|
|
11
17
|
export declare type new_farming_info_command = typeof new_farming_info_command;
|
|
12
18
|
export declare type TNewFarmingInfoBroadCast = {
|
|
@@ -27,10 +33,16 @@ export declare type TNewSignagePointBroadCast = {
|
|
|
27
33
|
signage_point: NewSignagePoint;
|
|
28
34
|
};
|
|
29
35
|
export declare function on_new_signage_point(daemon: TDaemon, callback: (e: GetMessageType<chia_farmer_service, new_signage_point_command, TNewSignagePointBroadCast>) => unknown): Promise<() => void>;
|
|
30
|
-
export declare const
|
|
31
|
-
export declare type
|
|
32
|
-
export declare type
|
|
33
|
-
export declare function
|
|
34
|
-
export declare
|
|
35
|
-
export declare type
|
|
36
|
+
export declare const harvester_update_command = "harvester_update";
|
|
37
|
+
export declare type harvester_update_command = typeof harvester_update_command;
|
|
38
|
+
export declare type THarvesterUpdateBroadCast = Receiver<true>;
|
|
39
|
+
export declare function on_harvester_update(daemon: TDaemon, callback: (e: GetMessageType<chia_farmer_service, harvester_update_command, THarvesterUpdateBroadCast>) => unknown): Promise<() => void>;
|
|
40
|
+
export declare const harvester_removed_command = "harvester_removed";
|
|
41
|
+
export declare type harvester_removed_command = typeof harvester_removed_command;
|
|
42
|
+
export declare type THarvesterRemovedBroadCast = {
|
|
43
|
+
node_id: bytes32;
|
|
44
|
+
};
|
|
45
|
+
export declare function on_harvester_removed(daemon: TDaemon, callback: (e: GetMessageType<chia_farmer_service, harvester_removed_command, THarvesterRemovedBroadCast>) => unknown): Promise<() => void>;
|
|
46
|
+
export declare type chia_farmer_commands = get_connections_command | new_farming_info_command | new_signage_point_command | harvester_update_command | harvester_removed_command;
|
|
47
|
+
export declare type TChiaFarmerBroadcast = TGetConnectionsBroadCast | TNewFarmingInfoBroadCast | TNewSignagePointBroadCast | THarvesterUpdateBroadCast | THarvesterRemovedBroadCast;
|
|
36
48
|
export declare function on_message_from_farmer(daemon: TDaemon, callback: (e: GetMessageType<chia_farmer_service, chia_farmer_commands, TChiaFarmerBroadcast>) => unknown): Promise<() => void>;
|
package/api/ws/farmer/index.js
CHANGED
|
@@ -9,9 +9,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.on_message_from_farmer = exports.
|
|
12
|
+
exports.on_message_from_farmer = exports.on_harvester_removed = exports.harvester_removed_command = exports.on_harvester_update = exports.harvester_update_command = exports.on_new_signage_point = exports.new_signage_point_command = exports.on_new_farming_info = exports.new_farming_info_command = exports.on_get_connections = exports.get_connections_command = exports.chia_farmer_service = void 0;
|
|
13
13
|
const types_1 = require("../../types");
|
|
14
14
|
exports.chia_farmer_service = "chia_farmer";
|
|
15
|
+
exports.get_connections_command = "get_connections";
|
|
16
|
+
function on_get_connections(daemon, callback) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
19
|
+
const messageListener = (e) => {
|
|
20
|
+
if (e.origin === exports.chia_farmer_service && e.command === exports.get_connections_command) {
|
|
21
|
+
callback(e);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return daemon.addMessageListener(exports.chia_farmer_service, messageListener);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.on_get_connections = on_get_connections;
|
|
15
28
|
exports.new_farming_info_command = "new_farming_info";
|
|
16
29
|
function on_new_farming_info(daemon, callback) {
|
|
17
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -38,19 +51,32 @@ function on_new_signage_point(daemon, callback) {
|
|
|
38
51
|
});
|
|
39
52
|
}
|
|
40
53
|
exports.on_new_signage_point = on_new_signage_point;
|
|
41
|
-
exports.
|
|
42
|
-
function
|
|
54
|
+
exports.harvester_update_command = "harvester_update";
|
|
55
|
+
function on_harvester_update(daemon, callback) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
58
|
+
const messageListener = (e) => {
|
|
59
|
+
if (e.origin === exports.chia_farmer_service && e.command === exports.harvester_update_command) {
|
|
60
|
+
callback(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
return daemon.addMessageListener(exports.chia_farmer_service, messageListener);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.on_harvester_update = on_harvester_update;
|
|
67
|
+
exports.harvester_removed_command = "harvester_removed";
|
|
68
|
+
function on_harvester_removed(daemon, callback) {
|
|
43
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
70
|
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
45
71
|
const messageListener = (e) => {
|
|
46
|
-
if (e.origin === exports.chia_farmer_service && e.command === exports.
|
|
72
|
+
if (e.origin === exports.chia_farmer_service && e.command === exports.harvester_removed_command) {
|
|
47
73
|
callback(e);
|
|
48
74
|
}
|
|
49
75
|
};
|
|
50
76
|
return daemon.addMessageListener(exports.chia_farmer_service, messageListener);
|
|
51
77
|
});
|
|
52
78
|
}
|
|
53
|
-
exports.
|
|
79
|
+
exports.on_harvester_removed = on_harvester_removed;
|
|
54
80
|
function on_message_from_farmer(daemon, callback) {
|
|
55
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
82
|
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { BlockRecord } from "../../chia/consensus/block_record";
|
|
2
|
-
import { bool, int, uint128, uint32, uint64 } from "../../chia/types/_python_types_";
|
|
2
|
+
import { bool, float, int, None, str, uint128, uint32, uint64, uint8 } from "../../chia/types/_python_types_";
|
|
3
3
|
import { TDaemon } from "../../../daemon/index";
|
|
4
|
-
import { GetMessageType } from "../../types";
|
|
4
|
+
import { GetMessageType, TConnectionGeneral } from "../../types";
|
|
5
|
+
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
6
|
+
import { NewSignagePoint } from "../../chia/protocols/farmer_protocol";
|
|
7
|
+
import { ReceiveBlockResult } from "../../chia/consensus/blockchain";
|
|
5
8
|
export declare const chia_full_node_service = "chia_full_node";
|
|
6
9
|
export declare type chia_full_node_service = typeof chia_full_node_service;
|
|
10
|
+
export declare type TConnectionFullNode = ({
|
|
11
|
+
peak_height: uint32;
|
|
12
|
+
peak_weight: uint128;
|
|
13
|
+
peak_hash: bytes32;
|
|
14
|
+
} | {
|
|
15
|
+
peak_height: None;
|
|
16
|
+
peak_weight: None;
|
|
17
|
+
peak_hash: None;
|
|
18
|
+
}) & TConnectionGeneral;
|
|
19
|
+
export declare const get_connections_command = "get_connections";
|
|
20
|
+
export declare type get_connections_command = typeof get_connections_command;
|
|
21
|
+
export declare type TGetConnectionsBroadCast = {
|
|
22
|
+
connections: TConnectionFullNode[];
|
|
23
|
+
};
|
|
24
|
+
export declare function on_get_connections(daemon: TDaemon, callback: (e: GetMessageType<chia_full_node_service, get_connections_command, TGetConnectionsBroadCast>) => unknown): Promise<() => void>;
|
|
7
25
|
export declare const get_blockchain_state_command = "get_blockchain_state";
|
|
8
26
|
export declare type get_blockchain_state_command = typeof get_blockchain_state_command;
|
|
9
27
|
export declare type TGetBlockchainStateBroadCast = {
|
|
@@ -20,9 +38,37 @@ export declare type TGetBlockchainStateBroadCast = {
|
|
|
20
38
|
sub_slot_iters: uint64;
|
|
21
39
|
space: uint128;
|
|
22
40
|
mempool_size: int;
|
|
41
|
+
mempool_cost: int;
|
|
42
|
+
"mempool_min_fees": {
|
|
43
|
+
"cost_5000000": float;
|
|
44
|
+
};
|
|
45
|
+
"mempool_max_total_cost": int;
|
|
46
|
+
"block_max_cost": int;
|
|
47
|
+
"node_id": str;
|
|
23
48
|
};
|
|
24
49
|
};
|
|
25
50
|
export declare function on_get_blockchain_state(daemon: TDaemon, callback: (e: GetMessageType<chia_full_node_service, get_blockchain_state_command, TGetBlockchainStateBroadCast>) => unknown): Promise<() => void>;
|
|
26
|
-
export declare
|
|
27
|
-
export declare type
|
|
51
|
+
export declare const block_command = "block";
|
|
52
|
+
export declare type block_command = typeof block_command;
|
|
53
|
+
export declare type TBlockBroadCast = {} | {
|
|
54
|
+
transaction_block: bool;
|
|
55
|
+
k_size: uint8;
|
|
56
|
+
header_hash: bytes32;
|
|
57
|
+
height: uint32;
|
|
58
|
+
block_cost?: uint64;
|
|
59
|
+
block_fees?: uint64;
|
|
60
|
+
timestamp?: uint64;
|
|
61
|
+
transaction_generator_size_bytes?: int;
|
|
62
|
+
transaction_generator_ref_list: uint32[];
|
|
63
|
+
receive_block_result?: ReceiveBlockResult;
|
|
64
|
+
};
|
|
65
|
+
export declare function on_block(daemon: TDaemon, callback: (e: GetMessageType<chia_full_node_service, block_command, TBlockBroadCast>) => unknown): Promise<() => void>;
|
|
66
|
+
export declare const signage_point_command = "signage_point";
|
|
67
|
+
export declare type signage_point_command = typeof signage_point_command;
|
|
68
|
+
export declare type TSignagePointBroadCast = {
|
|
69
|
+
broadcast_farmer: NewSignagePoint;
|
|
70
|
+
};
|
|
71
|
+
export declare function on_signage_point(daemon: TDaemon, callback: (e: GetMessageType<chia_full_node_service, signage_point_command, TSignagePointBroadCast>) => unknown): Promise<() => void>;
|
|
72
|
+
export declare type chia_full_node_commands = get_blockchain_state_command | get_connections_command | block_command | signage_point_command;
|
|
73
|
+
export declare type TChiaFullNodeBroadcast = TGetBlockchainStateBroadCast | TGetConnectionsBroadCast | TBlockBroadCast | TSignagePointBroadCast;
|
|
28
74
|
export declare function on_message_from_full_node(daemon: TDaemon, callback: (e: GetMessageType<chia_full_node_service, chia_full_node_commands, TChiaFullNodeBroadcast>) => unknown): Promise<() => void>;
|
|
@@ -9,9 +9,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.on_message_from_full_node = exports.on_get_blockchain_state = exports.get_blockchain_state_command = exports.chia_full_node_service = void 0;
|
|
12
|
+
exports.on_message_from_full_node = exports.on_signage_point = exports.signage_point_command = exports.on_block = exports.block_command = exports.on_get_blockchain_state = exports.get_blockchain_state_command = exports.on_get_connections = exports.get_connections_command = exports.chia_full_node_service = void 0;
|
|
13
13
|
const types_1 = require("../../types");
|
|
14
14
|
exports.chia_full_node_service = "chia_full_node";
|
|
15
|
+
exports.get_connections_command = "get_connections";
|
|
16
|
+
function on_get_connections(daemon, callback) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
19
|
+
const messageListener = (e) => {
|
|
20
|
+
if (e.origin === exports.chia_full_node_service && e.command === exports.get_connections_command) {
|
|
21
|
+
callback(e);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return daemon.addMessageListener(exports.chia_full_node_service, messageListener);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.on_get_connections = on_get_connections;
|
|
15
28
|
exports.get_blockchain_state_command = "get_blockchain_state";
|
|
16
29
|
function on_get_blockchain_state(daemon, callback) {
|
|
17
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -25,6 +38,32 @@ function on_get_blockchain_state(daemon, callback) {
|
|
|
25
38
|
});
|
|
26
39
|
}
|
|
27
40
|
exports.on_get_blockchain_state = on_get_blockchain_state;
|
|
41
|
+
exports.block_command = "block";
|
|
42
|
+
function on_block(daemon, callback) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
yield daemon.subscribe(types_1.metrics_service);
|
|
45
|
+
const messageListener = (e) => {
|
|
46
|
+
if (e.origin === exports.chia_full_node_service && e.command === exports.block_command) {
|
|
47
|
+
callback(e);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return daemon.addMessageListener(exports.chia_full_node_service, messageListener);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
exports.on_block = on_block;
|
|
54
|
+
exports.signage_point_command = "signage_point";
|
|
55
|
+
function on_signage_point(daemon, callback) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
yield daemon.subscribe(types_1.metrics_service);
|
|
58
|
+
const messageListener = (e) => {
|
|
59
|
+
if (e.origin === exports.chia_full_node_service && e.command === exports.signage_point_command) {
|
|
60
|
+
callback(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
return daemon.addMessageListener(exports.chia_full_node_service, messageListener);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.on_signage_point = on_signage_point;
|
|
28
67
|
function on_message_from_full_node(daemon, callback) {
|
|
29
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
69
|
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Plot } from "../../chia/harvester/harvester";
|
|
2
2
|
import { TDaemon } from "../../../daemon/index";
|
|
3
|
-
import { GetMessageType } from "../../types";
|
|
3
|
+
import { GetMessageType, TConnectionGeneral } from "../../types";
|
|
4
4
|
export declare const chia_harvester_service = "chia_harvester";
|
|
5
5
|
export declare type chia_harvester_service = typeof chia_harvester_service;
|
|
6
|
+
export declare const get_connections_command = "get_connections";
|
|
7
|
+
export declare type get_connections_command = typeof get_connections_command;
|
|
8
|
+
export declare type TGetConnectionsBroadCast = {
|
|
9
|
+
connections: TConnectionGeneral[];
|
|
10
|
+
};
|
|
11
|
+
export declare function on_get_connections(daemon: TDaemon, callback: (e: GetMessageType<chia_harvester_service, get_connections_command, TGetConnectionsBroadCast>) => unknown): Promise<() => void>;
|
|
6
12
|
export declare const get_plots_command = "get_plots";
|
|
7
13
|
export declare type get_plots_command = typeof get_plots_command;
|
|
8
14
|
export declare type TGetPlotsBroadCast = {
|
|
@@ -11,6 +17,6 @@ export declare type TGetPlotsBroadCast = {
|
|
|
11
17
|
not_found_filenames: string[];
|
|
12
18
|
};
|
|
13
19
|
export declare function on_get_plots(daemon: TDaemon, callback: (e: GetMessageType<chia_harvester_service, get_plots_command, TGetPlotsBroadCast>) => unknown): Promise<() => void>;
|
|
14
|
-
export declare type chia_harvester_commands = get_plots_command;
|
|
15
|
-
export declare type TChiaHarvesterBroadcast = TGetPlotsBroadCast;
|
|
20
|
+
export declare type chia_harvester_commands = get_plots_command | get_connections_command;
|
|
21
|
+
export declare type TChiaHarvesterBroadcast = TGetPlotsBroadCast | TGetConnectionsBroadCast;
|
|
16
22
|
export declare function on_message_from_harvester(daemon: TDaemon, callback: (e: GetMessageType<chia_harvester_service, chia_harvester_commands, TChiaHarvesterBroadcast>) => unknown): Promise<() => void>;
|