chia-agent 9.1.0 → 10.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 +189 -0
- package/README.md +12 -5
- package/api/chia/data_layer/data_layer_util.d.ts +8 -1
- package/api/chia/types/_python_types_.d.ts +1 -0
- package/api/chia/types/clvm_cost.d.ts +2 -0
- package/api/chia/types/clvm_cost.js +2 -0
- package/api/chia/types/mempool_item.d.ts +2 -4
- package/api/chia/util/keychain.d.ts +12 -0
- package/api/chia/util/keychain.js +2 -0
- package/api/chia/wallet/nft_wallet/nft_info.d.ts +3 -0
- package/api/chia/wallet/util/wallet_types.d.ts +0 -1
- package/api/chia/wallet/util/wallet_types.js +1 -1
- package/api/rpc/common/index.d.ts +19 -9
- package/api/rpc/crawler/index.d.ts +8 -2
- package/api/rpc/data_layer/index.d.ts +69 -27
- package/api/rpc/data_layer/index.js +8 -1
- package/api/rpc/farmer/index.d.ts +30 -13
- package/api/rpc/full_node/index.d.ts +76 -25
- package/api/rpc/full_node/index.js +8 -1
- package/api/rpc/harvester/index.d.ts +16 -6
- package/api/rpc/index.d.ts +11 -18
- package/api/rpc/index.js +14 -4
- package/api/rpc/wallet/index.d.ts +475 -95
- package/api/rpc/wallet/index.js +110 -4
- package/api/types.d.ts +3 -0
- package/api/ws/chia_plots_create/index.d.ts +4 -2
- package/api/ws/crawler/index.d.ts +5 -2
- package/api/ws/daemon/index.d.ts +165 -33
- package/api/ws/daemon/index.js +37 -2
- package/api/ws/farmer/index.d.ts +16 -8
- package/api/ws/full_node/index.d.ts +10 -5
- package/api/ws/harvester/index.d.ts +7 -3
- package/api/ws/index.d.ts +9 -18
- package/api/ws/index.js +15 -12
- package/api/ws/timelord/index.d.ts +9 -4
- package/api/ws/wallet/index.d.ts +11 -6
- package/daemon/index.d.ts +6 -7
- package/package.json +1 -1
- package/rpc/index.d.ts +1 -2
package/api/ws/daemon/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { GetMessageType } from "../../types";
|
|
2
2
|
import { TDaemon } from "../../../daemon/index";
|
|
3
|
-
import { bool, int, None, Optional, str, True } from "../../chia/types/_python_types_";
|
|
3
|
+
import { bool, False, int, None, Optional, str, True, uint32 } from "../../chia/types/_python_types_";
|
|
4
4
|
import { chiapos_install_info } from "../../chia/plotters/chiapos";
|
|
5
5
|
import { bladebit_install_info } from "../../chia/plotters/bladebit";
|
|
6
6
|
import { madmax_install_info } from "../../chia/plotters/maxmax";
|
|
7
|
+
import { KeyData } from "../../chia/util/keychain";
|
|
7
8
|
export declare const daemon_service = "daemon";
|
|
8
9
|
export declare type daemon_service = typeof daemon_service;
|
|
9
10
|
export declare const ping_command = "ping";
|
|
@@ -13,7 +14,8 @@ export declare type TPingResponse = {
|
|
|
13
14
|
success: True;
|
|
14
15
|
value: str;
|
|
15
16
|
};
|
|
16
|
-
export declare
|
|
17
|
+
export declare type WsPingMessage = GetMessageType<daemon_service, ping_command, TPingResponse>;
|
|
18
|
+
export declare function ping(daemon: TDaemon): Promise<WsPingMessage>;
|
|
17
19
|
export declare type TService = "chia" | "chia_wallet" | "chia_full_node" | "chia_harvester" | "chia_farmer" | "chia_introducer" | "chia_timelord" | "chia_timelord_launcher" | "chia_full_node_simulator";
|
|
18
20
|
export declare const start_service_command = "start_service";
|
|
19
21
|
export declare type start_service_command = typeof start_service_command;
|
|
@@ -26,7 +28,8 @@ export declare type TStartServiceResponse = {
|
|
|
26
28
|
service: TService;
|
|
27
29
|
error: Optional<str>;
|
|
28
30
|
};
|
|
29
|
-
export declare
|
|
31
|
+
export declare type WsStartServiceMessage = GetMessageType<daemon_service, start_service_command, TStartServiceResponse>;
|
|
32
|
+
export declare function start_service(daemon: TDaemon, data: TStartServiceRequest): Promise<WsStartServiceMessage>;
|
|
30
33
|
export declare const start_plotting_command = "start_plotting";
|
|
31
34
|
export declare type start_plotting_command = typeof start_plotting_command;
|
|
32
35
|
export declare type TCommonPlottingParams = {
|
|
@@ -53,10 +56,31 @@ export declare type TChiaPosParams = {
|
|
|
53
56
|
e: bool;
|
|
54
57
|
overrideK: bool;
|
|
55
58
|
};
|
|
56
|
-
export declare type
|
|
59
|
+
export declare type TBladeBitRamParams = {
|
|
57
60
|
plotter: "bladebit";
|
|
61
|
+
plot_type: "ramplot";
|
|
58
62
|
w?: bool;
|
|
59
63
|
m?: bool;
|
|
64
|
+
no_cpu_affinity?: bool;
|
|
65
|
+
};
|
|
66
|
+
export declare type TBladeBitDiskParams = {
|
|
67
|
+
plotter: "bladebit";
|
|
68
|
+
plot_type: "diskplot";
|
|
69
|
+
w?: bool;
|
|
70
|
+
m?: bool;
|
|
71
|
+
no_cpu_affinity?: bool;
|
|
72
|
+
t1: str;
|
|
73
|
+
t2?: str;
|
|
74
|
+
u?: int;
|
|
75
|
+
cache?: str;
|
|
76
|
+
f1_threads?: int;
|
|
77
|
+
fp_threads?: int;
|
|
78
|
+
c_threads?: int;
|
|
79
|
+
p2_threads?: int;
|
|
80
|
+
p3_threads?: int;
|
|
81
|
+
alternate?: bool;
|
|
82
|
+
no_t1_direct?: bool;
|
|
83
|
+
no_t2_direct?: bool;
|
|
60
84
|
};
|
|
61
85
|
export declare type TMadMaxParams = {
|
|
62
86
|
plotter: "madmax";
|
|
@@ -67,13 +91,14 @@ export declare type TMadMaxParams = {
|
|
|
67
91
|
K?: int;
|
|
68
92
|
G?: bool;
|
|
69
93
|
};
|
|
70
|
-
export declare type TStartPlottingRequest = TCommonPlottingParams & (TChiaPosParams |
|
|
94
|
+
export declare type TStartPlottingRequest = TCommonPlottingParams & (TChiaPosParams | TBladeBitRamParams | TBladeBitDiskParams | TMadMaxParams);
|
|
71
95
|
export declare type TStartPlottingResponse = {
|
|
72
96
|
success: bool;
|
|
73
97
|
ids: str[];
|
|
74
98
|
service_name: str;
|
|
75
99
|
};
|
|
76
|
-
export declare
|
|
100
|
+
export declare type WsStartPlottingMessage = GetMessageType<daemon_service, start_plotting_command, TStartPlottingResponse>;
|
|
101
|
+
export declare function start_plotting(daemon: TDaemon, data: TStartPlottingRequest): Promise<WsStartPlottingMessage>;
|
|
77
102
|
export declare const stop_plotting_command = "stop_plotting";
|
|
78
103
|
export declare type stop_plotting_command = typeof stop_plotting_command;
|
|
79
104
|
export declare type TStopPlottingRequest = {
|
|
@@ -82,7 +107,8 @@ export declare type TStopPlottingRequest = {
|
|
|
82
107
|
export declare type TStopPlottingResponse = {
|
|
83
108
|
success: bool;
|
|
84
109
|
};
|
|
85
|
-
export declare
|
|
110
|
+
export declare type WsStopPlottingMessage = GetMessageType<daemon_service, stop_plotting_command, TStopPlottingResponse>;
|
|
111
|
+
export declare function stop_plotting(daemon: TDaemon, data: TStopPlottingRequest): Promise<WsStopPlottingMessage>;
|
|
86
112
|
export declare const stop_service_command = "stop_service";
|
|
87
113
|
export declare type stop_service_command = typeof stop_service_command;
|
|
88
114
|
export declare type TStopServiceRequest = {
|
|
@@ -92,7 +118,16 @@ export declare type TStopServiceResponse = {
|
|
|
92
118
|
success: bool;
|
|
93
119
|
service_name: str;
|
|
94
120
|
};
|
|
95
|
-
export declare
|
|
121
|
+
export declare type WsStopServiceMessage = GetMessageType<daemon_service, stop_service_command, TStopServiceResponse>;
|
|
122
|
+
export declare function stop_service(daemon: TDaemon, data: TStopServiceRequest): Promise<WsStopServiceMessage>;
|
|
123
|
+
export declare const running_services_command = "running_services";
|
|
124
|
+
export declare type running_services_command = typeof running_services_command;
|
|
125
|
+
export declare type TRunningServicesResponse = {
|
|
126
|
+
success: bool;
|
|
127
|
+
running_services: str[];
|
|
128
|
+
};
|
|
129
|
+
export declare type WsRunningServicesMessage = GetMessageType<daemon_service, running_services_command, TRunningServicesResponse>;
|
|
130
|
+
export declare function running_services(daemon: TDaemon): Promise<WsRunningServicesMessage>;
|
|
96
131
|
export declare const is_running_command = "is_running";
|
|
97
132
|
export declare type is_running_command = typeof is_running_command;
|
|
98
133
|
export declare type TIsRunningRequest = {
|
|
@@ -103,14 +138,15 @@ export declare type TIsRunningResponse = {
|
|
|
103
138
|
service_name: str;
|
|
104
139
|
is_running: bool;
|
|
105
140
|
};
|
|
106
|
-
export declare
|
|
141
|
+
export declare type WsIsRunningMessage = GetMessageType<daemon_service, is_running_command, TIsRunningResponse>;
|
|
142
|
+
export declare function is_running(daemon: TDaemon, data: TIsRunningRequest): Promise<WsIsRunningMessage>;
|
|
107
143
|
export declare const add_private_key_command = "add_private_key";
|
|
108
144
|
export declare type add_private_key_command = typeof add_private_key_command;
|
|
109
145
|
export declare type TAddPrivateKeyRequest = {
|
|
110
146
|
kc_user?: str;
|
|
111
147
|
kc_testing?: bool;
|
|
112
148
|
mnemonic?: str;
|
|
113
|
-
|
|
149
|
+
label?: str;
|
|
114
150
|
};
|
|
115
151
|
export declare type TAddPrivateKeyResponse = {
|
|
116
152
|
success: bool;
|
|
@@ -119,7 +155,8 @@ export declare type TAddPrivateKeyResponse = {
|
|
|
119
155
|
message: str;
|
|
120
156
|
};
|
|
121
157
|
};
|
|
122
|
-
export declare
|
|
158
|
+
export declare type WsAddPrivateKeyMessage = GetMessageType<daemon_service, add_private_key_command, TAddPrivateKeyResponse>;
|
|
159
|
+
export declare function add_private_key(daemon: TDaemon, data: TAddPrivateKeyRequest): Promise<WsAddPrivateKeyMessage>;
|
|
123
160
|
export declare const check_keys_command = "check_keys";
|
|
124
161
|
export declare type check_keys_command = typeof check_keys_command;
|
|
125
162
|
export declare type TCheckKeysRequest = {
|
|
@@ -134,7 +171,8 @@ export declare type TCheckKeysResponse = {
|
|
|
134
171
|
message: str;
|
|
135
172
|
};
|
|
136
173
|
};
|
|
137
|
-
export declare
|
|
174
|
+
export declare type WsCheckKeysMessage = GetMessageType<daemon_service, check_keys_command, TCheckKeysResponse>;
|
|
175
|
+
export declare function check_keys(daemon: TDaemon, data: TCheckKeysRequest): Promise<WsCheckKeysMessage>;
|
|
138
176
|
export declare const delete_all_keys_command = "delete_all_keys";
|
|
139
177
|
export declare type delete_all_keys_command = typeof delete_all_keys_command;
|
|
140
178
|
export declare type TDeleteAllKeysRequest = {
|
|
@@ -148,7 +186,8 @@ export declare type TDeleteAllKeysResponse = {
|
|
|
148
186
|
message: str;
|
|
149
187
|
};
|
|
150
188
|
};
|
|
151
|
-
export declare
|
|
189
|
+
export declare type WsDeleteAllKeysMessage = GetMessageType<daemon_service, delete_all_keys_command, TDeleteAllKeysResponse>;
|
|
190
|
+
export declare function delete_all_keys(daemon: TDaemon, data: TDeleteAllKeysRequest): Promise<WsDeleteAllKeysMessage>;
|
|
152
191
|
export declare const delete_key_by_fingerprint_command = "delete_key_by_fingerprint";
|
|
153
192
|
export declare type delete_key_by_fingerprint_command = typeof delete_key_by_fingerprint_command;
|
|
154
193
|
export declare type TDeleteKeyByFingerprintRequest = {
|
|
@@ -163,7 +202,8 @@ export declare type TDeleteKeyByFingerprintResponse = {
|
|
|
163
202
|
message: str;
|
|
164
203
|
};
|
|
165
204
|
};
|
|
166
|
-
export declare
|
|
205
|
+
export declare type WsDeleteKeyByFingerprintMessage = GetMessageType<daemon_service, delete_key_by_fingerprint_command, TDeleteKeyByFingerprintResponse>;
|
|
206
|
+
export declare function delete_key_by_fingerprint(daemon: TDaemon, data: TDeleteKeyByFingerprintRequest): Promise<WsDeleteKeyByFingerprintMessage>;
|
|
167
207
|
export declare const get_all_private_keys_command = "get_all_private_keys";
|
|
168
208
|
export declare type get_all_private_keys_command = typeof get_all_private_keys_command;
|
|
169
209
|
export declare type TGetAllPrivateKeysRequest = {
|
|
@@ -178,7 +218,8 @@ export declare type TGetAllPrivateKeysResponse = {
|
|
|
178
218
|
entropy: str;
|
|
179
219
|
}>;
|
|
180
220
|
};
|
|
181
|
-
export declare
|
|
221
|
+
export declare type WsGetAllPrivateKeysMessage = GetMessageType<daemon_service, get_all_private_keys_command, TGetAllPrivateKeysResponse>;
|
|
222
|
+
export declare function get_all_private_keys(daemon: TDaemon, data: TGetAllPrivateKeysRequest): Promise<WsGetAllPrivateKeysMessage>;
|
|
182
223
|
export declare const get_first_private_key_command = "get_first_private_key";
|
|
183
224
|
export declare type get_first_private_key_command = typeof get_first_private_key_command;
|
|
184
225
|
export declare type TGetFirstPrivateKeyRequest = {
|
|
@@ -193,7 +234,8 @@ export declare type TGetFirstPrivateKeyResponse = {
|
|
|
193
234
|
entropy: str;
|
|
194
235
|
};
|
|
195
236
|
};
|
|
196
|
-
export declare
|
|
237
|
+
export declare type WsGetFirstPrivateKeyMessage = GetMessageType<daemon_service, get_first_private_key_command, TGetFirstPrivateKeyResponse>;
|
|
238
|
+
export declare function get_first_private_key(daemon: TDaemon, data: TGetFirstPrivateKeyRequest): Promise<WsGetFirstPrivateKeyMessage>;
|
|
197
239
|
export declare const get_key_for_fingerprint_command = "get_key_for_fingerprint";
|
|
198
240
|
export declare type get_key_for_fingerprint_command = typeof get_key_for_fingerprint_command;
|
|
199
241
|
export declare type TGetKeyForFingerprintRequest = {
|
|
@@ -207,14 +249,92 @@ export declare type TGetKeyForFingerprintResponse = {
|
|
|
207
249
|
pk: str;
|
|
208
250
|
entropy: str;
|
|
209
251
|
};
|
|
210
|
-
export declare
|
|
252
|
+
export declare type WsGetKeyForFingerprintMessage = GetMessageType<daemon_service, get_key_for_fingerprint_command, TGetKeyForFingerprintResponse>;
|
|
253
|
+
export declare function get_key_for_fingerprint(daemon: TDaemon, data: TGetKeyForFingerprintRequest): Promise<WsGetKeyForFingerprintMessage>;
|
|
254
|
+
export declare const get_key_command = "get_key";
|
|
255
|
+
export declare type get_key_command = typeof get_key_command;
|
|
256
|
+
export declare type TGetKeyRequest = {
|
|
257
|
+
fingerprint: uint32;
|
|
258
|
+
include_secrets?: bool;
|
|
259
|
+
};
|
|
260
|
+
export declare type TGetKeyResponse = {
|
|
261
|
+
success: True;
|
|
262
|
+
key: KeyData;
|
|
263
|
+
} | {
|
|
264
|
+
success: False;
|
|
265
|
+
error: "keyring is locked" | "key not found" | "malformed request";
|
|
266
|
+
error_details?: {
|
|
267
|
+
message: str;
|
|
268
|
+
} | {
|
|
269
|
+
fingerprint: int;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
export declare type WsGetKeyMessage = GetMessageType<daemon_service, get_key_command, TGetKeyResponse>;
|
|
273
|
+
export declare function get_key(daemon: TDaemon, data: TGetKeyRequest): Promise<WsGetKeyMessage>;
|
|
274
|
+
export declare const get_keys_command = "get_keys";
|
|
275
|
+
export declare type get_keys_command = typeof get_keys_command;
|
|
276
|
+
export declare type TGetKeysRequest = {
|
|
277
|
+
include_secrets?: bool;
|
|
278
|
+
};
|
|
279
|
+
export declare type TGetKeysResponse = {
|
|
280
|
+
success: True;
|
|
281
|
+
keys: KeyData[];
|
|
282
|
+
} | {
|
|
283
|
+
success: False;
|
|
284
|
+
error: "keyring is locked" | "key not found" | "malformed request";
|
|
285
|
+
error_details?: {
|
|
286
|
+
message: str;
|
|
287
|
+
} | {
|
|
288
|
+
fingerprint: int;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
export declare type WsGetKeysMessage = GetMessageType<daemon_service, get_keys_command, TGetKeysResponse>;
|
|
292
|
+
export declare function get_keys(daemon: TDaemon, data: TGetKeysRequest): Promise<WsGetKeysMessage>;
|
|
293
|
+
export declare const set_label_command = "set_label";
|
|
294
|
+
export declare type set_label_command = typeof set_label_command;
|
|
295
|
+
export declare type TSetLabelRequest = {
|
|
296
|
+
fingerprint: uint32;
|
|
297
|
+
label: str;
|
|
298
|
+
};
|
|
299
|
+
export declare type TSetLabelResponse = {
|
|
300
|
+
success: True;
|
|
301
|
+
} | {
|
|
302
|
+
success: False;
|
|
303
|
+
error: "keyring is locked" | "key not found" | "malformed request";
|
|
304
|
+
error_details?: {
|
|
305
|
+
message: str;
|
|
306
|
+
} | {
|
|
307
|
+
fingerprint: int;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
export declare type WsSetLabelMessage = GetMessageType<daemon_service, set_label_command, TSetLabelResponse>;
|
|
311
|
+
export declare function set_label(daemon: TDaemon, data: TSetLabelRequest): Promise<WsSetLabelMessage>;
|
|
312
|
+
export declare const delete_label_command = "delete_label";
|
|
313
|
+
export declare type delete_label_command = typeof delete_label_command;
|
|
314
|
+
export declare type TDeleteLabelRequest = {
|
|
315
|
+
fingerprint: uint32;
|
|
316
|
+
};
|
|
317
|
+
export declare type TDeleteLabelResponse = {
|
|
318
|
+
success: True;
|
|
319
|
+
} | {
|
|
320
|
+
success: False;
|
|
321
|
+
error: "keyring is locked" | "key not found" | "malformed request";
|
|
322
|
+
error_details?: {
|
|
323
|
+
message: str;
|
|
324
|
+
} | {
|
|
325
|
+
fingerprint: int;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
export declare type WsDeleteLabelMessage = GetMessageType<daemon_service, delete_label_command, TDeleteLabelResponse>;
|
|
329
|
+
export declare function delete_label(daemon: TDaemon, data: TDeleteLabelRequest): Promise<WsDeleteLabelMessage>;
|
|
211
330
|
export declare const is_keyring_locked_command = "is_keyring_locked";
|
|
212
331
|
export declare type is_keyring_locked_command = typeof is_keyring_locked_command;
|
|
213
332
|
export declare type TIsKeyringLockedResponse = {
|
|
214
333
|
success: bool;
|
|
215
334
|
is_keyring_locked: bool;
|
|
216
335
|
};
|
|
217
|
-
export declare
|
|
336
|
+
export declare type WsIsKeyringLockedMessage = GetMessageType<daemon_service, is_keyring_locked_command, TIsKeyringLockedResponse>;
|
|
337
|
+
export declare function is_keyring_locked(daemon: TDaemon): Promise<WsIsKeyringLockedMessage>;
|
|
218
338
|
export declare const keyring_status_command = "keyring_status";
|
|
219
339
|
export declare type keyring_status_command = typeof keyring_status_command;
|
|
220
340
|
export declare type TKeyringStatusResponse = {
|
|
@@ -223,8 +343,6 @@ export declare type TKeyringStatusResponse = {
|
|
|
223
343
|
passphrase_support_enabled: bool;
|
|
224
344
|
can_save_passphrase: bool;
|
|
225
345
|
user_passphrase_is_set: bool;
|
|
226
|
-
needs_migration: bool;
|
|
227
|
-
can_remove_legacy_keys: bool;
|
|
228
346
|
can_set_passphrase_hint: bool;
|
|
229
347
|
passphrase_hint: str;
|
|
230
348
|
passphrase_requirements: {} | {
|
|
@@ -232,7 +350,8 @@ export declare type TKeyringStatusResponse = {
|
|
|
232
350
|
min_length: int;
|
|
233
351
|
};
|
|
234
352
|
};
|
|
235
|
-
export declare
|
|
353
|
+
export declare type WsKeyringStateMessage = GetMessageType<daemon_service, keyring_status_command, TKeyringStatusResponse>;
|
|
354
|
+
export declare function keyring_status(daemon: TDaemon): Promise<WsKeyringStateMessage>;
|
|
236
355
|
export declare const unlock_keyring_command = "unlock_keyring";
|
|
237
356
|
export declare type unlock_keyring_command = typeof unlock_keyring_command;
|
|
238
357
|
export declare type TUnlockKeyringRequest = {
|
|
@@ -242,7 +361,8 @@ export declare type TUnlockKeyringResponse = {
|
|
|
242
361
|
success: bool;
|
|
243
362
|
error: str | None;
|
|
244
363
|
};
|
|
245
|
-
export declare
|
|
364
|
+
export declare type WsUnlockKeyringMessage = GetMessageType<daemon_service, unlock_keyring_command, TUnlockKeyringResponse>;
|
|
365
|
+
export declare function unlock_keyring(daemon: TDaemon, data: TUnlockKeyringRequest): Promise<WsUnlockKeyringMessage>;
|
|
246
366
|
export declare const validate_keyring_passphrase_command = "validate_keyring_passphrase";
|
|
247
367
|
export declare type validate_keyring_passphrase_command = typeof validate_keyring_passphrase_command;
|
|
248
368
|
export declare type TValidateKeyringPassphraseRequest = {
|
|
@@ -252,7 +372,8 @@ export declare type TValidateKeyringPassphraseResponse = {
|
|
|
252
372
|
success: bool;
|
|
253
373
|
error: str | None;
|
|
254
374
|
};
|
|
255
|
-
export declare
|
|
375
|
+
export declare type WsValidateKeyringPassphraseMessage = GetMessageType<daemon_service, validate_keyring_passphrase_command, TValidateKeyringPassphraseResponse>;
|
|
376
|
+
export declare function validate_keyring_passphrase(daemon: TDaemon, data: TValidateKeyringPassphraseRequest): Promise<WsValidateKeyringPassphraseMessage>;
|
|
256
377
|
export declare const migrate_keyring_command = "migrate_keyring";
|
|
257
378
|
export declare type migrate_keyring_command = typeof migrate_keyring_command;
|
|
258
379
|
export declare type TMigrateKeyringRequest = {
|
|
@@ -265,7 +386,8 @@ export declare type TMigrateKeyringResponse = {
|
|
|
265
386
|
success: bool;
|
|
266
387
|
error: str | None;
|
|
267
388
|
};
|
|
268
|
-
export declare
|
|
389
|
+
export declare type WsMigrateKeyringMessage = GetMessageType<daemon_service, migrate_keyring_command, TMigrateKeyringResponse>;
|
|
390
|
+
export declare function migrate_keyring(daemon: TDaemon, data: TMigrateKeyringRequest): Promise<WsMigrateKeyringMessage>;
|
|
269
391
|
export declare const set_keyring_passphrase_command = "set_keyring_passphrase";
|
|
270
392
|
export declare type set_keyring_passphrase_command = typeof set_keyring_passphrase_command;
|
|
271
393
|
export declare type TSetKeyringPassphraseRequest = {
|
|
@@ -278,7 +400,8 @@ export declare type TSetKeyringPassphraseResponse = {
|
|
|
278
400
|
success: bool;
|
|
279
401
|
error: str;
|
|
280
402
|
};
|
|
281
|
-
export declare
|
|
403
|
+
export declare type WsSetKeyringPassphraseMessage = GetMessageType<daemon_service, set_keyring_passphrase_command, TSetKeyringPassphraseResponse>;
|
|
404
|
+
export declare function set_keyring_passphrase(daemon: TDaemon, data: TSetKeyringPassphraseRequest): Promise<WsSetKeyringPassphraseMessage>;
|
|
282
405
|
export declare const remove_keyring_passphrase_command = "remove_keyring_passphrase";
|
|
283
406
|
export declare type remove_keyring_passphrase_command = typeof remove_keyring_passphrase_command;
|
|
284
407
|
export declare type TRemoveKeyringPassphraseRequest = {
|
|
@@ -288,7 +411,8 @@ export declare type TRemoveKeyringPassphraseResponse = {
|
|
|
288
411
|
success: bool;
|
|
289
412
|
error: str;
|
|
290
413
|
};
|
|
291
|
-
export declare
|
|
414
|
+
export declare type WsRemoveKeyringPassphraseMessage = GetMessageType<daemon_service, remove_keyring_passphrase_command, TRemoveKeyringPassphraseResponse>;
|
|
415
|
+
export declare function remove_keyring_passphrase(daemon: TDaemon, data: TRemoveKeyringPassphraseRequest): Promise<WsRemoveKeyringPassphraseMessage>;
|
|
292
416
|
export declare const notify_keyring_migration_completed_command = "notify_keyring_migration_completed";
|
|
293
417
|
export declare type notify_keyring_migration_completed_command = typeof notify_keyring_migration_completed_command;
|
|
294
418
|
export declare type TNotifyKeyringMigrationCompletedRequest = {
|
|
@@ -298,14 +422,16 @@ export declare type TNotifyKeyringMigrationCompletedResponse = {
|
|
|
298
422
|
success: bool;
|
|
299
423
|
error: str;
|
|
300
424
|
};
|
|
301
|
-
export declare
|
|
425
|
+
export declare type WsNotifyKeyringMigrationCompletedMessage = GetMessageType<daemon_service, notify_keyring_migration_completed_command, TNotifyKeyringMigrationCompletedResponse>;
|
|
426
|
+
export declare function notify_keyring_migration_completed(daemon: TDaemon, data: TNotifyKeyringMigrationCompletedRequest): Promise<WsNotifyKeyringMigrationCompletedMessage>;
|
|
302
427
|
export declare const exit_command = "exit";
|
|
303
428
|
export declare type exit_command = typeof exit_command;
|
|
304
429
|
export declare type TExitRequest = {};
|
|
305
430
|
export declare type TExitResponse = {
|
|
306
431
|
success: bool;
|
|
307
432
|
};
|
|
308
|
-
export declare
|
|
433
|
+
export declare type WsExitMessage = GetMessageType<daemon_service, exit_command, TExitResponse>;
|
|
434
|
+
export declare function exit(daemon: TDaemon): Promise<WsExitMessage>;
|
|
309
435
|
export declare type TPlotQueue = {
|
|
310
436
|
id: str;
|
|
311
437
|
queue: str;
|
|
@@ -330,7 +456,8 @@ export declare type TRegisterServiceResponse = {
|
|
|
330
456
|
service: str;
|
|
331
457
|
queue: TPlotQueue[];
|
|
332
458
|
};
|
|
333
|
-
export declare
|
|
459
|
+
export declare type WsRegisterServiceMessage = GetMessageType<daemon_service, register_service_command, TRegisterServiceResponse>;
|
|
460
|
+
export declare function register_service(daemon: TDaemon, data: TRegisterServiceRequest): Promise<WsRegisterServiceMessage>;
|
|
334
461
|
export declare const get_status_command = "get_status";
|
|
335
462
|
export declare type get_status_command = typeof get_status_command;
|
|
336
463
|
export declare type TGetStatusRequest = {};
|
|
@@ -338,7 +465,8 @@ export declare type TGetStatusResponse = {
|
|
|
338
465
|
success: True;
|
|
339
466
|
genesis_initialized: True;
|
|
340
467
|
};
|
|
341
|
-
export declare
|
|
468
|
+
export declare type WsGetStatusMessage = GetMessageType<daemon_service, get_status_command, TGetStatusResponse>;
|
|
469
|
+
export declare function get_status(daemon: TDaemon): Promise<WsGetStatusMessage>;
|
|
342
470
|
export declare const get_version_command = "get_version";
|
|
343
471
|
export declare type get_version_command = typeof get_version_command;
|
|
344
472
|
export declare type TGetVersionRequest = {};
|
|
@@ -346,7 +474,8 @@ export declare type TGetVersionResponse = {
|
|
|
346
474
|
success: bool;
|
|
347
475
|
version: string;
|
|
348
476
|
};
|
|
349
|
-
export declare
|
|
477
|
+
export declare type WsGetVersionMessage = GetMessageType<daemon_service, get_version_command, TGetVersionResponse>;
|
|
478
|
+
export declare function get_version(daemon: TDaemon): Promise<WsGetVersionMessage>;
|
|
350
479
|
export declare const get_plotters_command = "get_plotters";
|
|
351
480
|
export declare type get_plotters_command = typeof get_plotters_command;
|
|
352
481
|
export declare type TGetPlottersRequest = {};
|
|
@@ -358,10 +487,13 @@ export declare type TGetPlottersResponse = {
|
|
|
358
487
|
madmax?: madmax_install_info;
|
|
359
488
|
};
|
|
360
489
|
};
|
|
361
|
-
export declare
|
|
490
|
+
export declare type WsGetPlottersMessage = GetMessageType<daemon_service, get_plotters_command, TGetPlottersResponse>;
|
|
491
|
+
export declare function get_plotters(daemon: TDaemon): Promise<WsGetPlottersMessage>;
|
|
362
492
|
export declare const keyring_status_changed_command = "keyring_status_changed";
|
|
363
493
|
export declare type keyring_status_changed_command = typeof keyring_status_changed_command;
|
|
364
494
|
export declare type TKeyringStatusChangedBroadCast = {
|
|
365
495
|
keyring_status_changed: TKeyringStatusResponse;
|
|
366
496
|
};
|
|
367
|
-
export declare
|
|
497
|
+
export declare type WsKeyringStatusChangedMessage = GetMessageType<daemon_service, keyring_status_changed_command, TKeyringStatusChangedBroadCast>;
|
|
498
|
+
export declare function on_keyring_status_changed(daemon: TDaemon, callback: (e: WsKeyringStatusChangedMessage) => unknown): Promise<() => void>;
|
|
499
|
+
export declare type WsDaemonMessage = WsExitMessage | WsGetStatusMessage | WsGetVersionMessage | WsGetPlottersMessage | WsRunningServicesMessage | WsIsRunningMessage | WsPingMessage | WsRegisterServiceMessage | WsStartPlottingMessage | WsStartServiceMessage | WsStopPlottingMessage | WsStopServiceMessage | WsAddPrivateKeyMessage | WsCheckKeysMessage | WsDeleteAllKeysMessage | WsDeleteKeyByFingerprintMessage | WsGetAllPrivateKeysMessage | WsGetFirstPrivateKeyMessage | WsGetKeyForFingerprintMessage | WsGetKeyMessage | WsGetKeysMessage | WsSetLabelMessage | WsDeleteLabelMessage | WsIsKeyringLockedMessage | WsKeyringStateMessage | WsUnlockKeyringMessage | WsValidateKeyringPassphraseMessage | WsMigrateKeyringMessage | WsSetKeyringPassphraseMessage | WsRemoveKeyringPassphraseMessage | WsNotifyKeyringMigrationCompletedMessage | WsKeyringStatusChangedMessage;
|
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 = exports.get_plotters_command = exports.get_version = void 0;
|
|
12
|
+
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.delete_label = exports.delete_label_command = exports.set_label = exports.set_label_command = exports.get_keys = exports.get_keys_command = exports.get_key = exports.get_key_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.running_services = exports.running_services_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 = 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 = 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";
|
|
@@ -49,6 +49,13 @@ function stop_service(daemon, data) {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
exports.stop_service = stop_service;
|
|
52
|
+
exports.running_services_command = "running_services";
|
|
53
|
+
function running_services(daemon) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return daemon.sendMessage(exports.daemon_service, exports.running_services_command);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.running_services = running_services;
|
|
52
59
|
exports.is_running_command = "is_running";
|
|
53
60
|
function is_running(daemon, data) {
|
|
54
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -105,6 +112,34 @@ function get_key_for_fingerprint(daemon, data) {
|
|
|
105
112
|
});
|
|
106
113
|
}
|
|
107
114
|
exports.get_key_for_fingerprint = get_key_for_fingerprint;
|
|
115
|
+
exports.get_key_command = "get_key";
|
|
116
|
+
function get_key(daemon, data) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return daemon.sendMessage(exports.daemon_service, exports.get_key_command, data);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
exports.get_key = get_key;
|
|
122
|
+
exports.get_keys_command = "get_keys";
|
|
123
|
+
function get_keys(daemon, data) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
return daemon.sendMessage(exports.daemon_service, exports.get_keys_command, data);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
exports.get_keys = get_keys;
|
|
129
|
+
exports.set_label_command = "set_label";
|
|
130
|
+
function set_label(daemon, data) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
return daemon.sendMessage(exports.daemon_service, exports.set_label_command, data);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
exports.set_label = set_label;
|
|
136
|
+
exports.delete_label_command = "delete_label";
|
|
137
|
+
function delete_label(daemon, data) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return daemon.sendMessage(exports.daemon_service, exports.delete_label_command, data);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
exports.delete_label = delete_label;
|
|
108
143
|
exports.is_keyring_locked_command = "is_keyring_locked";
|
|
109
144
|
function is_keyring_locked(daemon) {
|
|
110
145
|
return __awaiter(this, void 0, void 0, function* () {
|
package/api/ws/farmer/index.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export declare type get_connections_command = typeof get_connections_command;
|
|
|
12
12
|
export declare type TGetConnectionsBroadCast = {
|
|
13
13
|
connections: TConnectionGeneral[];
|
|
14
14
|
};
|
|
15
|
-
export declare
|
|
15
|
+
export declare type WsGetConnectionFarmerMessage = GetMessageType<chia_farmer_service, get_connections_command, TGetConnectionsBroadCast>;
|
|
16
|
+
export declare function on_get_connections(daemon: TDaemon, callback: (e: WsGetConnectionFarmerMessage) => unknown): Promise<() => void>;
|
|
16
17
|
export declare const new_farming_info_command = "new_farming_info";
|
|
17
18
|
export declare type new_farming_info_command = typeof new_farming_info_command;
|
|
18
19
|
export declare type TNewFarmingInfoBroadCast = {
|
|
@@ -25,31 +26,36 @@ export declare type TNewFarmingInfoBroadCast = {
|
|
|
25
26
|
timestamp: uint64;
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
|
-
export declare
|
|
29
|
+
export declare type WsNewFarmingInfoMessage = GetMessageType<chia_farmer_service, new_farming_info_command, TNewFarmingInfoBroadCast>;
|
|
30
|
+
export declare function on_new_farming_info(daemon: TDaemon, callback: (e: WsNewFarmingInfoMessage) => unknown): Promise<() => void>;
|
|
29
31
|
export declare const new_signage_point_command = "new_signage_point";
|
|
30
32
|
export declare type new_signage_point_command = typeof new_signage_point_command;
|
|
31
33
|
export declare type TNewSignagePointBroadCast = {
|
|
32
34
|
proofs: ProofOfSpace[];
|
|
33
35
|
signage_point: NewSignagePoint;
|
|
34
36
|
};
|
|
35
|
-
export declare
|
|
37
|
+
export declare type WsNewSignagePointMessage = GetMessageType<chia_farmer_service, new_signage_point_command, TNewSignagePointBroadCast>;
|
|
38
|
+
export declare function on_new_signage_point(daemon: TDaemon, callback: (e: WsNewSignagePointMessage) => unknown): Promise<() => void>;
|
|
36
39
|
export declare const harvester_update_command = "harvester_update";
|
|
37
40
|
export declare type harvester_update_command = typeof harvester_update_command;
|
|
38
41
|
export declare type THarvesterUpdateBroadCast = Receiver<true>;
|
|
39
|
-
export declare
|
|
42
|
+
export declare type WsHarvesterUpdateMessage = GetMessageType<chia_farmer_service, harvester_update_command, THarvesterUpdateBroadCast>;
|
|
43
|
+
export declare function on_harvester_update(daemon: TDaemon, callback: (e: WsHarvesterUpdateMessage) => unknown): Promise<() => void>;
|
|
40
44
|
export declare const harvester_removed_command = "harvester_removed";
|
|
41
45
|
export declare type harvester_removed_command = typeof harvester_removed_command;
|
|
42
46
|
export declare type THarvesterRemovedBroadCast = {
|
|
43
47
|
node_id: bytes32;
|
|
44
48
|
};
|
|
45
|
-
export declare
|
|
49
|
+
export declare type WsHarvesterRemovedMessage = GetMessageType<chia_farmer_service, harvester_removed_command, THarvesterRemovedBroadCast>;
|
|
50
|
+
export declare function on_harvester_removed(daemon: TDaemon, callback: (e: WsHarvesterRemovedMessage) => unknown): Promise<() => void>;
|
|
46
51
|
export declare const proof_command = "proof";
|
|
47
52
|
export declare type proof_command = typeof proof_command;
|
|
48
53
|
export declare type TProofBroadCast = {
|
|
49
54
|
proof: DeclareProofOfSpace;
|
|
50
55
|
passed_filter: bool;
|
|
51
56
|
};
|
|
52
|
-
export declare
|
|
57
|
+
export declare type WsProofMessage = GetMessageType<chia_farmer_service, proof_command, TProofBroadCast>;
|
|
58
|
+
export declare function on_proof(daemon: TDaemon, callback: (e: WsProofMessage) => unknown): Promise<() => void>;
|
|
53
59
|
export declare const submitted_partial_command = "submitted_partial";
|
|
54
60
|
export declare type submitted_partial_command = typeof submitted_partial_command;
|
|
55
61
|
export declare type TSubmittedPartialBroadCast = {
|
|
@@ -59,7 +65,9 @@ export declare type TSubmittedPartialBroadCast = {
|
|
|
59
65
|
points_acknowledged_since_start: uint64;
|
|
60
66
|
points_acknowledged_24h: Array<[float, uint64]>;
|
|
61
67
|
};
|
|
62
|
-
export declare
|
|
68
|
+
export declare type WsSubmittedPartialMessage = GetMessageType<chia_farmer_service, submitted_partial_command, TSubmittedPartialBroadCast>;
|
|
69
|
+
export declare function on_submitted_partial(daemon: TDaemon, callback: (e: WsSubmittedPartialMessage) => unknown): Promise<() => void>;
|
|
70
|
+
export declare type WsFarmerMessage = WsGetConnectionFarmerMessage | WsNewFarmingInfoMessage | WsNewSignagePointMessage | WsHarvesterUpdateMessage | WsHarvesterRemovedMessage | WsProofMessage | WsSubmittedPartialMessage;
|
|
63
71
|
export declare type chia_farmer_commands = get_connections_command | new_farming_info_command | new_signage_point_command | harvester_update_command | harvester_removed_command | proof_command | submitted_partial_command;
|
|
64
72
|
export declare type TChiaFarmerBroadcast = TGetConnectionsBroadCast | TNewFarmingInfoBroadCast | TNewSignagePointBroadCast | THarvesterUpdateBroadCast | THarvesterRemovedBroadCast | TProofBroadCast | TSubmittedPartialBroadCast;
|
|
65
|
-
export declare function on_message_from_farmer(daemon: TDaemon, callback: (e:
|
|
73
|
+
export declare function on_message_from_farmer(daemon: TDaemon, callback: (e: WsFarmerMessage) => unknown): Promise<() => void>;
|
|
@@ -21,7 +21,8 @@ export declare type get_connections_command = typeof get_connections_command;
|
|
|
21
21
|
export declare type TGetConnectionsBroadCast = {
|
|
22
22
|
connections: TConnectionFullNode[];
|
|
23
23
|
};
|
|
24
|
-
export declare
|
|
24
|
+
export declare type WsGetConnectionFullNodeMessage = GetMessageType<chia_full_node_service, get_connections_command, TGetConnectionsBroadCast>;
|
|
25
|
+
export declare function on_get_connections(daemon: TDaemon, callback: (e: WsGetConnectionFullNodeMessage) => unknown): Promise<() => void>;
|
|
25
26
|
export declare const get_blockchain_state_command = "get_blockchain_state";
|
|
26
27
|
export declare type get_blockchain_state_command = typeof get_blockchain_state_command;
|
|
27
28
|
export declare type TGetBlockchainStateBroadCast = {
|
|
@@ -47,7 +48,8 @@ export declare type TGetBlockchainStateBroadCast = {
|
|
|
47
48
|
"node_id": str;
|
|
48
49
|
};
|
|
49
50
|
};
|
|
50
|
-
export declare
|
|
51
|
+
export declare type WsGetBlockchainStateMessage = GetMessageType<chia_full_node_service, get_blockchain_state_command, TGetBlockchainStateBroadCast>;
|
|
52
|
+
export declare function on_get_blockchain_state(daemon: TDaemon, callback: (e: WsGetBlockchainStateMessage) => unknown): Promise<() => void>;
|
|
51
53
|
export declare const block_command = "block";
|
|
52
54
|
export declare type block_command = typeof block_command;
|
|
53
55
|
export declare type TBlockBroadCast = {} | {
|
|
@@ -62,13 +64,16 @@ export declare type TBlockBroadCast = {} | {
|
|
|
62
64
|
transaction_generator_ref_list: uint32[];
|
|
63
65
|
receive_block_result?: ReceiveBlockResult;
|
|
64
66
|
};
|
|
65
|
-
export declare
|
|
67
|
+
export declare type WsBlockMessage = GetMessageType<chia_full_node_service, block_command, TBlockBroadCast>;
|
|
68
|
+
export declare function on_block(daemon: TDaemon, callback: (e: WsBlockMessage) => unknown): Promise<() => void>;
|
|
66
69
|
export declare const signage_point_command = "signage_point";
|
|
67
70
|
export declare type signage_point_command = typeof signage_point_command;
|
|
68
71
|
export declare type TSignagePointBroadCast = {
|
|
69
72
|
broadcast_farmer: NewSignagePoint;
|
|
70
73
|
};
|
|
71
|
-
export declare
|
|
74
|
+
export declare type WsSignagePointMessage = GetMessageType<chia_full_node_service, signage_point_command, TSignagePointBroadCast>;
|
|
75
|
+
export declare function on_signage_point(daemon: TDaemon, callback: (e: WsSignagePointMessage) => unknown): Promise<() => void>;
|
|
76
|
+
export declare type WsFullNodeMessage = WsGetConnectionFullNodeMessage | WsGetBlockchainStateMessage | WsBlockMessage | WsSignagePointMessage;
|
|
72
77
|
export declare type chia_full_node_commands = get_blockchain_state_command | get_connections_command | block_command | signage_point_command;
|
|
73
78
|
export declare type TChiaFullNodeBroadcast = TGetBlockchainStateBroadCast | TGetConnectionsBroadCast | TBlockBroadCast | TSignagePointBroadCast;
|
|
74
|
-
export declare function on_message_from_full_node(daemon: TDaemon, callback: (e:
|
|
79
|
+
export declare function on_message_from_full_node(daemon: TDaemon, callback: (e: WsFullNodeMessage) => unknown): Promise<() => void>;
|
|
@@ -9,7 +9,8 @@ export declare type get_connections_command = typeof get_connections_command;
|
|
|
9
9
|
export declare type TGetConnectionsBroadCast = {
|
|
10
10
|
connections: TConnectionGeneral[];
|
|
11
11
|
};
|
|
12
|
-
export declare
|
|
12
|
+
export declare type WsGetConnectionsHarvesterMessage = GetMessageType<chia_harvester_service, get_connections_command, TGetConnectionsBroadCast>;
|
|
13
|
+
export declare function on_get_connections(daemon: TDaemon, callback: (e: WsGetConnectionsHarvesterMessage) => unknown): Promise<() => void>;
|
|
13
14
|
export declare const get_plots_command = "get_plots";
|
|
14
15
|
export declare type get_plots_command = typeof get_plots_command;
|
|
15
16
|
export declare type TGetPlotsBroadCast = {
|
|
@@ -17,7 +18,8 @@ export declare type TGetPlotsBroadCast = {
|
|
|
17
18
|
failed_to_open_filenames: string[];
|
|
18
19
|
not_found_filenames: string[];
|
|
19
20
|
};
|
|
20
|
-
export declare
|
|
21
|
+
export declare type WsGetPlotsMessage = GetMessageType<chia_harvester_service, get_plots_command, TGetPlotsBroadCast>;
|
|
22
|
+
export declare function on_get_plots(daemon: TDaemon, callback: (e: WsGetPlotsMessage) => unknown): Promise<() => void>;
|
|
21
23
|
export declare const farming_info_command = "farming_info";
|
|
22
24
|
export declare type farming_info_command = typeof farming_info_command;
|
|
23
25
|
export declare type TFarmingInfoBroadCast = {
|
|
@@ -27,7 +29,9 @@ export declare type TFarmingInfoBroadCast = {
|
|
|
27
29
|
eligible_plots: int;
|
|
28
30
|
time: float;
|
|
29
31
|
};
|
|
32
|
+
export declare type WsFarmingInfoMessage = GetMessageType<chia_harvester_service, farming_info_command, TFarmingInfoBroadCast>;
|
|
30
33
|
export declare function on_farming_info(daemon: TDaemon, callback: (e: GetMessageType<chia_harvester_service, farming_info_command, TFarmingInfoBroadCast>) => unknown): Promise<() => void>;
|
|
34
|
+
export declare type WsHarvesterMessage = WsGetConnectionsHarvesterMessage | WsGetPlotsMessage | WsFarmingInfoMessage;
|
|
31
35
|
export declare type chia_harvester_commands = get_plots_command | farming_info_command | get_connections_command;
|
|
32
36
|
export declare type TChiaHarvesterBroadcast = TGetPlotsBroadCast | TFarmingInfoBroadCast | TGetConnectionsBroadCast;
|
|
33
|
-
export declare function on_message_from_harvester(daemon: TDaemon, callback: (e:
|
|
37
|
+
export declare function on_message_from_harvester(daemon: TDaemon, callback: (e: WsHarvesterMessage) => unknown): Promise<() => void>;
|