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
|
@@ -2,7 +2,10 @@ import { TRPCAgent } from "../../../rpc/index";
|
|
|
2
2
|
import { bool, None, Optional, str, uint64 } from "../../chia/types/_python_types_";
|
|
3
3
|
import { TransactionRecord } from "../../chia/wallet/transaction_record";
|
|
4
4
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
5
|
-
import { OfferMarshalled, OfferStoreMarshalled } from "../../chia/data_layer/data_layer_util";
|
|
5
|
+
import { OfferMarshalled, OfferStoreMarshalled, SyncStatus } from "../../chia/data_layer/data_layer_util";
|
|
6
|
+
import { TCancelOfferResponseDL, TTakeOfferResponseDL } from "../index";
|
|
7
|
+
import { GetMessageType, ResType } from "../../types";
|
|
8
|
+
import { TDaemon } from "../../../daemon/index";
|
|
6
9
|
export declare const chia_data_layer_service = "chia_data_layer";
|
|
7
10
|
export declare type chia_data_layer_service = typeof chia_data_layer_service;
|
|
8
11
|
export declare const create_data_store_command = "create_data_store";
|
|
@@ -14,13 +17,15 @@ export declare type TCreateDataStoreResponse = {
|
|
|
14
17
|
txs: TransactionRecord[];
|
|
15
18
|
id: str;
|
|
16
19
|
};
|
|
17
|
-
export declare
|
|
20
|
+
export declare type WsCreateDataStoreMessage = GetMessageType<chia_data_layer_service, create_data_store_command, TCreateDataStoreResponse>;
|
|
21
|
+
export declare function create_data_store<T extends TRPCAgent | TDaemon>(agent: T, params: TCreateDataStoreRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TCreateDataStoreResponse, WsCreateDataStoreMessage>>;
|
|
18
22
|
export declare const get_owned_stores_command = "get_owned_stores";
|
|
19
23
|
export declare type get_owned_stores_command = typeof get_owned_stores_command;
|
|
20
24
|
export declare type TGetOwnedStoresResponse = {
|
|
21
25
|
store_ids: str[];
|
|
22
26
|
};
|
|
23
|
-
export declare
|
|
27
|
+
export declare type WsGetOwnedStoresMessage = GetMessageType<chia_data_layer_service, get_owned_stores_command, TGetOwnedStoresResponse>;
|
|
28
|
+
export declare function get_owned_stores<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetOwnedStoresResponse, WsGetOwnedStoresMessage>>;
|
|
24
29
|
export declare const batch_update_command = "batch_update";
|
|
25
30
|
export declare type batch_update_command = typeof batch_update_command;
|
|
26
31
|
export declare type TBatchUpdateRequest = {
|
|
@@ -36,17 +41,20 @@ export declare type TBatchUpdateRequest = {
|
|
|
36
41
|
export declare type TBatchUpdateResponse = {
|
|
37
42
|
tx_id: bytes32;
|
|
38
43
|
};
|
|
39
|
-
export declare
|
|
44
|
+
export declare type WsBatchUpdateMessage = GetMessageType<chia_data_layer_service, batch_update_command, TBatchUpdateResponse>;
|
|
45
|
+
export declare function batch_update<T extends TRPCAgent | TDaemon>(agent: T, params: TBatchUpdateRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TBatchUpdateResponse, WsBatchUpdateMessage>>;
|
|
40
46
|
export declare const get_value_command = "get_value";
|
|
41
47
|
export declare type get_value_command = typeof get_value_command;
|
|
42
48
|
export declare type TGetValueRequest = {
|
|
43
49
|
id: str;
|
|
44
50
|
key: str;
|
|
51
|
+
root_hash?: str;
|
|
45
52
|
};
|
|
46
53
|
export declare type TGetValueResponse = {
|
|
47
54
|
value: str | None;
|
|
48
55
|
};
|
|
49
|
-
export declare
|
|
56
|
+
export declare type WsGetValueMessage = GetMessageType<chia_data_layer_service, get_value_command, TGetValueResponse>;
|
|
57
|
+
export declare function get_value<T extends TRPCAgent | TDaemon>(agent: T, params: TGetValueRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetValueResponse, WsGetValueMessage>>;
|
|
50
58
|
export declare const get_keys_command = "get_keys";
|
|
51
59
|
export declare type get_keys_command = typeof get_keys_command;
|
|
52
60
|
export declare type TGetKeysRequest = {
|
|
@@ -56,7 +64,8 @@ export declare type TGetKeysRequest = {
|
|
|
56
64
|
export declare type TGetKeysResponse = {
|
|
57
65
|
keys: str[];
|
|
58
66
|
};
|
|
59
|
-
export declare
|
|
67
|
+
export declare type WsGetKeysMessage = GetMessageType<chia_data_layer_service, get_keys_command, TGetKeysResponse>;
|
|
68
|
+
export declare function get_keys<T extends TRPCAgent | TDaemon>(agent: T, params: TGetKeysRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetKeysResponse, WsGetKeysMessage>>;
|
|
60
69
|
export declare const get_keys_values_command = "get_keys_values";
|
|
61
70
|
export declare type get_keys_values_command = typeof get_keys_values_command;
|
|
62
71
|
export declare type TGetKeysValuesRequest = {
|
|
@@ -70,7 +79,8 @@ export declare type TGetKeysValuesResponse = {
|
|
|
70
79
|
value: str;
|
|
71
80
|
}>;
|
|
72
81
|
};
|
|
73
|
-
export declare
|
|
82
|
+
export declare type WsGetKeysValuesMessage = GetMessageType<chia_data_layer_service, get_keys_values_command, TGetKeysValuesResponse>;
|
|
83
|
+
export declare function get_keys_values<T extends TRPCAgent | TDaemon>(agent: T, params: TGetKeysValuesRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetKeysValuesResponse, WsGetKeysValuesMessage>>;
|
|
74
84
|
export declare const get_ancestors_command = "get_ancestors";
|
|
75
85
|
export declare type get_ancestors_command = typeof get_ancestors_command;
|
|
76
86
|
export declare type TGetAncestorsRequest = {
|
|
@@ -84,7 +94,8 @@ export declare type TGetAncestorsResponse = {
|
|
|
84
94
|
right_hash: bytes32;
|
|
85
95
|
}>;
|
|
86
96
|
};
|
|
87
|
-
export declare
|
|
97
|
+
export declare type WsGetAncestorsMessage = GetMessageType<chia_data_layer_service, get_ancestors_command, TGetAncestorsResponse>;
|
|
98
|
+
export declare function get_ancestors<T extends TRPCAgent | TDaemon>(agent: T, params: TGetAncestorsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetAncestorsResponse, WsGetAncestorsMessage>>;
|
|
88
99
|
export declare const get_root_command = "get_root";
|
|
89
100
|
export declare type get_root_command = typeof get_root_command;
|
|
90
101
|
export declare type TGetRootRequest = {
|
|
@@ -95,7 +106,8 @@ export declare type TGetRootResponse = {
|
|
|
95
106
|
confirmed: bool;
|
|
96
107
|
timestamp: uint64;
|
|
97
108
|
};
|
|
98
|
-
export declare
|
|
109
|
+
export declare type WsGetRootMessage = GetMessageType<chia_data_layer_service, get_root_command, TGetRootResponse>;
|
|
110
|
+
export declare function get_root<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRootRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRootResponse, WsGetRootMessage>>;
|
|
99
111
|
export declare const get_local_root_command = "get_local_root";
|
|
100
112
|
export declare type get_local_root_command = typeof get_local_root_command;
|
|
101
113
|
export declare type TGetLocalRootRequest = {
|
|
@@ -104,7 +116,8 @@ export declare type TGetLocalRootRequest = {
|
|
|
104
116
|
export declare type TGetLocalRootResponse = {
|
|
105
117
|
hash: bytes32 | None;
|
|
106
118
|
};
|
|
107
|
-
export declare
|
|
119
|
+
export declare type WsGetLocalRootMessage = GetMessageType<chia_data_layer_service, get_local_root_command, TGetLocalRootResponse>;
|
|
120
|
+
export declare function get_local_root<T extends TRPCAgent | TDaemon>(agent: T, params: TGetLocalRootRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetLocalRootResponse, WsGetLocalRootMessage>>;
|
|
108
121
|
export declare const get_roots_command = "get_roots";
|
|
109
122
|
export declare type get_roots_command = typeof get_roots_command;
|
|
110
123
|
export declare type TGetRootsRequest = {
|
|
@@ -118,7 +131,8 @@ export declare type TGetRootsResponse = {
|
|
|
118
131
|
timestamp: uint64;
|
|
119
132
|
}>;
|
|
120
133
|
};
|
|
121
|
-
export declare
|
|
134
|
+
export declare type WsGetRootsMessage = GetMessageType<chia_data_layer_service, get_roots_command, TGetRootsResponse>;
|
|
135
|
+
export declare function get_roots<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRootsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRootsResponse, WsGetRootsMessage>>;
|
|
122
136
|
export declare const delete_key_command = "delete_key";
|
|
123
137
|
export declare type delete_key_command = typeof delete_key_command;
|
|
124
138
|
export declare type TDeleteKeyRequest = {
|
|
@@ -129,7 +143,8 @@ export declare type TDeleteKeyRequest = {
|
|
|
129
143
|
export declare type TDeleteKeyResponse = {
|
|
130
144
|
tx_id: bytes32;
|
|
131
145
|
};
|
|
132
|
-
export declare
|
|
146
|
+
export declare type WsDeleteKeyMessage = GetMessageType<chia_data_layer_service, delete_key_command, TDeleteKeyResponse>;
|
|
147
|
+
export declare function delete_key<T extends TRPCAgent | TDaemon>(agent: T, params: TDeleteKeyRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TDeleteKeyResponse, WsDeleteKeyMessage>>;
|
|
133
148
|
export declare const insert_command = "insert";
|
|
134
149
|
export declare type insert_command = typeof insert_command;
|
|
135
150
|
export declare type TInsertRequest = {
|
|
@@ -141,7 +156,8 @@ export declare type TInsertRequest = {
|
|
|
141
156
|
export declare type TInsertResponse = {
|
|
142
157
|
tx_id: bytes32;
|
|
143
158
|
};
|
|
144
|
-
export declare
|
|
159
|
+
export declare type WsInsertMessage = GetMessageType<chia_data_layer_service, insert_command, TInsertResponse>;
|
|
160
|
+
export declare function insert<T extends TRPCAgent | TDaemon>(agent: T, params: TInsertRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TInsertResponse, WsInsertMessage>>;
|
|
145
161
|
export declare const subscribe_command = "subscribe";
|
|
146
162
|
export declare type subscribe_command = typeof subscribe_command;
|
|
147
163
|
export declare type TSubscribeRequest = {
|
|
@@ -149,14 +165,16 @@ export declare type TSubscribeRequest = {
|
|
|
149
165
|
urls: str[];
|
|
150
166
|
};
|
|
151
167
|
export declare type TSubscribeResponse = {};
|
|
152
|
-
export declare
|
|
168
|
+
export declare type WsSubscribeMessage = GetMessageType<chia_data_layer_service, subscribe_command, TSubscribeResponse>;
|
|
169
|
+
export declare function subscribe<T extends TRPCAgent | TDaemon>(agent: T, params: TSubscribeRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TSubscribeResponse, WsSubscribeMessage>>;
|
|
153
170
|
export declare const unsubscribe_command = "unsubscribe";
|
|
154
171
|
export declare type unsubscribe_command = typeof unsubscribe_command;
|
|
155
172
|
export declare type TUnsubscribeRequest = {
|
|
156
173
|
id: str;
|
|
157
174
|
};
|
|
158
175
|
export declare type TUnsubscribeResponse = {};
|
|
159
|
-
export declare
|
|
176
|
+
export declare type WsUnsubscribeMessage = GetMessageType<chia_data_layer_service, unsubscribe_command, TUnsubscribeResponse>;
|
|
177
|
+
export declare function unsubscribe<T extends TRPCAgent | TDaemon>(agent: T, params: TUnsubscribeRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TUnsubscribeResponse, WsUnsubscribeMessage>>;
|
|
160
178
|
export declare const add_mirror_command = "add_mirror";
|
|
161
179
|
export declare type add_mirror_command = typeof add_mirror_command;
|
|
162
180
|
export declare type TAddMirrorRequest = {
|
|
@@ -166,7 +184,8 @@ export declare type TAddMirrorRequest = {
|
|
|
166
184
|
fee?: uint64;
|
|
167
185
|
};
|
|
168
186
|
export declare type TAddMirrorResponse = {};
|
|
169
|
-
export declare
|
|
187
|
+
export declare type WsAddMirrorMessage = GetMessageType<chia_data_layer_service, add_mirror_command, TAddMirrorResponse>;
|
|
188
|
+
export declare function add_mirror<T extends TRPCAgent | TDaemon>(agent: T, params: TAddMirrorRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TAddMirrorResponse, WsAddMirrorMessage>>;
|
|
170
189
|
export declare const delete_mirror_command = "delete_mirror";
|
|
171
190
|
export declare type delete_mirror_command = typeof delete_mirror_command;
|
|
172
191
|
export declare type TDeleteMirrorRequest = {
|
|
@@ -174,7 +193,8 @@ export declare type TDeleteMirrorRequest = {
|
|
|
174
193
|
fee?: uint64;
|
|
175
194
|
};
|
|
176
195
|
export declare type TDeleteMirrorResponse = {};
|
|
177
|
-
export declare
|
|
196
|
+
export declare type WsDeleteMirrorMessage = GetMessageType<chia_data_layer_service, delete_mirror_command, TDeleteMirrorResponse>;
|
|
197
|
+
export declare function delete_mirror<T extends TRPCAgent | TDaemon>(agent: T, params: TDeleteMirrorRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TDeleteMirrorResponse, WsDeleteMirrorMessage>>;
|
|
178
198
|
export declare const get_mirrors_command = "get_mirrors";
|
|
179
199
|
export declare type get_mirrors_command = typeof get_mirrors_command;
|
|
180
200
|
export declare type TGetMirrorsRequest = {
|
|
@@ -189,7 +209,8 @@ export declare type TGetMirrorsResponse = {
|
|
|
189
209
|
ours: bool;
|
|
190
210
|
}>;
|
|
191
211
|
};
|
|
192
|
-
export declare
|
|
212
|
+
export declare type WsGetMirrorsMessage = GetMessageType<chia_data_layer_service, get_mirrors_command, TGetMirrorsResponse>;
|
|
213
|
+
export declare function get_mirrors<T extends TRPCAgent | TDaemon>(agent: T, params: TGetMirrorsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetMirrorsResponse, WsGetMirrorsMessage>>;
|
|
193
214
|
export declare const remove_subscriptions_command = "remove_subscriptions";
|
|
194
215
|
export declare type remove_subscriptions_command = typeof remove_subscriptions_command;
|
|
195
216
|
export declare type TRemoveSubscriptionsRequest = {
|
|
@@ -197,13 +218,15 @@ export declare type TRemoveSubscriptionsRequest = {
|
|
|
197
218
|
urls: str[];
|
|
198
219
|
};
|
|
199
220
|
export declare type TRemoveSubscriptionsResponse = {};
|
|
200
|
-
export declare
|
|
221
|
+
export declare type WsRemoveSubscriptionsMessage = GetMessageType<chia_data_layer_service, remove_subscriptions_command, TRemoveSubscriptionsResponse>;
|
|
222
|
+
export declare function remove_subscriptions<T extends TRPCAgent | TDaemon>(agent: T, params: TRemoveSubscriptionsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TRemoveSubscriptionsResponse, WsRemoveSubscriptionsMessage>>;
|
|
201
223
|
export declare const subscriptions_command = "subscriptions";
|
|
202
224
|
export declare type subscriptions_command = typeof subscriptions_command;
|
|
203
225
|
export declare type TSubscriptionsResponse = {
|
|
204
226
|
store_ids: str[];
|
|
205
227
|
};
|
|
206
|
-
export declare
|
|
228
|
+
export declare type WsSubscriptionsMessage = GetMessageType<chia_data_layer_service, subscriptions_command, TSubscriptionsResponse>;
|
|
229
|
+
export declare function subscriptions<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TSubscriptionsResponse, WsSubscriptionsMessage>>;
|
|
207
230
|
export declare const get_kv_diff_command = "get_kv_diff";
|
|
208
231
|
export declare type get_kv_diff_command = typeof get_kv_diff_command;
|
|
209
232
|
export declare type TGetKvDiffRequest = {
|
|
@@ -218,7 +241,8 @@ export declare type TGetKvDiffResponse = {
|
|
|
218
241
|
value: str;
|
|
219
242
|
}>;
|
|
220
243
|
};
|
|
221
|
-
export declare
|
|
244
|
+
export declare type WsGetKvDiffMessage = GetMessageType<chia_data_layer_service, get_kv_diff_command, TGetKvDiffResponse>;
|
|
245
|
+
export declare function get_kv_diff<T extends TRPCAgent | TDaemon>(agent: T, params: TGetKvDiffRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetKvDiffResponse, WsGetKvDiffMessage>>;
|
|
222
246
|
export declare const get_root_history_command = "get_root_history";
|
|
223
247
|
export declare type get_root_history_command = typeof get_root_history_command;
|
|
224
248
|
export declare type TGetRootHistoryRequest = {
|
|
@@ -231,7 +255,8 @@ export declare type TGetRootHistoryResponse = {
|
|
|
231
255
|
timestamp: uint64;
|
|
232
256
|
}>;
|
|
233
257
|
};
|
|
234
|
-
export declare
|
|
258
|
+
export declare type WsGetRootHistoryMessage = GetMessageType<chia_data_layer_service, get_root_history_command, TGetRootHistoryResponse>;
|
|
259
|
+
export declare function get_root_history<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRootHistoryRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRootHistoryResponse, WsGetRootHistoryMessage>>;
|
|
235
260
|
export declare const add_missing_files_command = "add_missing_files";
|
|
236
261
|
export declare type add_missing_files_command = typeof add_missing_files_command;
|
|
237
262
|
export declare type TAddMissingFilesRequest = {
|
|
@@ -240,7 +265,8 @@ export declare type TAddMissingFilesRequest = {
|
|
|
240
265
|
foldername?: str;
|
|
241
266
|
};
|
|
242
267
|
export declare type TAddMissingFilesResponse = {};
|
|
243
|
-
export declare
|
|
268
|
+
export declare type WsAddMissingFilesMessage = GetMessageType<chia_data_layer_service, add_missing_files_command, TAddMissingFilesResponse>;
|
|
269
|
+
export declare function add_missing_files<T extends TRPCAgent | TDaemon>(agent: T, params: TAddMissingFilesRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TAddMissingFilesResponse, WsAddMissingFilesMessage>>;
|
|
244
270
|
export declare const make_offer_command = "make_offer";
|
|
245
271
|
export declare type make_offer_command = typeof make_offer_command;
|
|
246
272
|
export declare type TMakeOfferRequest = {
|
|
@@ -252,7 +278,8 @@ export declare type TMakeOfferResponse = {
|
|
|
252
278
|
success: bool;
|
|
253
279
|
offer: OfferMarshalled;
|
|
254
280
|
};
|
|
255
|
-
export declare
|
|
281
|
+
export declare type WsMakeOfferMessage = GetMessageType<chia_data_layer_service, make_offer_command, TMakeOfferResponse>;
|
|
282
|
+
export declare function make_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TMakeOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TMakeOfferResponse, WsMakeOfferMessage>>;
|
|
256
283
|
export declare const take_offer_command = "take_offer";
|
|
257
284
|
export declare type take_offer_command = typeof take_offer_command;
|
|
258
285
|
export declare type TTakeOfferRequest = {
|
|
@@ -263,7 +290,8 @@ export declare type TTakeOfferResponse = {
|
|
|
263
290
|
success: bool;
|
|
264
291
|
trade_id: str;
|
|
265
292
|
};
|
|
266
|
-
export declare
|
|
293
|
+
export declare type WsTakeOfferMessageDL = GetMessageType<chia_data_layer_service, take_offer_command, TTakeOfferResponse>;
|
|
294
|
+
export declare function take_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TTakeOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TTakeOfferResponseDL, WsTakeOfferMessageDL>>;
|
|
267
295
|
export declare const verify_offer_command = "verify_offer";
|
|
268
296
|
export declare type verify_offer_command = typeof verify_offer_command;
|
|
269
297
|
export declare type TVerifyOfferRequest = {
|
|
@@ -276,7 +304,8 @@ export declare type TVerifyOfferResponse = {
|
|
|
276
304
|
error: Optional<str>;
|
|
277
305
|
fee: Optional<uint64>;
|
|
278
306
|
};
|
|
279
|
-
export declare
|
|
307
|
+
export declare type WsVerifyOfferMessage = GetMessageType<chia_data_layer_service, verify_offer_command, TVerifyOfferResponse>;
|
|
308
|
+
export declare function verify_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TVerifyOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TVerifyOfferResponse, WsVerifyOfferMessage>>;
|
|
280
309
|
export declare const cancel_offer_command = "cancel_offer";
|
|
281
310
|
export declare type cancel_offer_command = typeof cancel_offer_command;
|
|
282
311
|
export declare type TCancelOfferRequest = {
|
|
@@ -287,4 +316,17 @@ export declare type TCancelOfferRequest = {
|
|
|
287
316
|
export declare type TCancelOfferResponse = {
|
|
288
317
|
success: bool;
|
|
289
318
|
};
|
|
290
|
-
export declare
|
|
319
|
+
export declare type WsCancelOfferMessageDL = GetMessageType<chia_data_layer_service, cancel_offer_command, TCancelOfferResponse>;
|
|
320
|
+
export declare function cancel_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TCancelOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TCancelOfferResponseDL, WsCancelOfferMessageDL>>;
|
|
321
|
+
export declare const get_sync_status_command = "get_sync_status";
|
|
322
|
+
export declare type get_sync_status_command = typeof get_sync_status_command;
|
|
323
|
+
export declare type TGetSyncStatusRequest = {
|
|
324
|
+
id: str;
|
|
325
|
+
};
|
|
326
|
+
export declare type TGetSyncStatusResponse = {
|
|
327
|
+
sync_status: SyncStatus;
|
|
328
|
+
};
|
|
329
|
+
export declare type WsGetSyncStatusMessage = GetMessageType<chia_data_layer_service, get_sync_status_command, TGetSyncStatusResponse>;
|
|
330
|
+
export declare function get_sync_status<T extends TRPCAgent | TDaemon>(agent: T, params: TGetSyncStatusRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetSyncStatusResponse, WsGetSyncStatusMessage>>;
|
|
331
|
+
export declare type RpcDataLayerMessage = TCreateDataStoreResponse | TGetOwnedStoresResponse | TBatchUpdateResponse | TGetValueResponse | TGetKeysResponse | TGetKeysValuesResponse | TGetAncestorsResponse | TGetRootResponse | TGetLocalRootResponse | TGetRootsResponse | TDeleteKeyResponse | TInsertResponse | TSubscribeResponse | TUnsubscribeResponse | TAddMirrorResponse | TDeleteMirrorResponse | TGetMirrorsResponse | TRemoveSubscriptionsResponse | TSubscriptionsResponse | TGetKvDiffResponse | TGetRootHistoryResponse | TAddMissingFilesResponse | TMakeOfferResponse | TTakeOfferResponseDL | TVerifyOfferResponse | TCancelOfferResponseDL | TGetSyncStatusResponse;
|
|
332
|
+
export declare type RpcDataLayerMessageOnWs = WsCreateDataStoreMessage | WsGetOwnedStoresMessage | WsBatchUpdateMessage | WsGetValueMessage | WsGetKeysMessage | WsGetKeysValuesMessage | WsGetAncestorsMessage | WsGetRootMessage | WsGetLocalRootMessage | WsGetRootsMessage | WsDeleteKeyMessage | WsInsertMessage | WsSubscribeMessage | WsUnsubscribeMessage | WsAddMirrorMessage | WsDeleteMirrorMessage | WsGetMirrorsMessage | WsRemoveSubscriptionsMessage | WsSubscriptionsMessage | WsGetKvDiffMessage | WsGetRootHistoryMessage | WsAddMissingFilesMessage | WsMakeOfferMessage | WsTakeOfferMessageDL | WsVerifyOfferMessage | WsCancelOfferMessageDL | WsGetSyncStatusMessage;
|
|
@@ -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.verify_offer_command = exports.take_offer = exports.take_offer_command = exports.make_offer = exports.make_offer_command = exports.add_missing_files = exports.add_missing_files_command = exports.get_root_history = exports.get_root_history_command = exports.get_kv_diff = exports.get_kv_diff_command = exports.subscriptions = exports.subscriptions_command = exports.remove_subscriptions = exports.remove_subscriptions_command = exports.get_mirrors = exports.get_mirrors_command = exports.delete_mirror = exports.delete_mirror_command = exports.add_mirror = exports.add_mirror_command = exports.unsubscribe = exports.unsubscribe_command = exports.subscribe = exports.subscribe_command = exports.insert = exports.insert_command = exports.delete_key = exports.delete_key_command = exports.get_roots = exports.get_roots_command = exports.get_local_root = exports.get_local_root_command = exports.get_root = exports.get_root_command = exports.get_ancestors = exports.get_ancestors_command = exports.get_keys_values = exports.get_keys_values_command = exports.get_keys = exports.get_keys_command = exports.get_value = exports.get_value_command = exports.batch_update = exports.batch_update_command = exports.get_owned_stores = exports.get_owned_stores_command = exports.create_data_store = exports.create_data_store_command = exports.chia_data_layer_service = void 0;
|
|
13
|
-
exports.cancel_offer = exports.cancel_offer_command = exports.verify_offer = void 0;
|
|
13
|
+
exports.get_sync_status = exports.get_sync_status_command = exports.cancel_offer = exports.cancel_offer_command = exports.verify_offer = void 0;
|
|
14
14
|
exports.chia_data_layer_service = "chia_data_layer";
|
|
15
15
|
exports.create_data_store_command = "create_data_store";
|
|
16
16
|
function create_data_store(agent, params) {
|
|
@@ -194,3 +194,10 @@ function cancel_offer(agent, params) {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
exports.cancel_offer = cancel_offer;
|
|
197
|
+
exports.get_sync_status_command = "get_sync_status";
|
|
198
|
+
function get_sync_status(agent, params) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
return agent.sendMessage(exports.chia_data_layer_service, exports.get_sync_status_command, params);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
exports.get_sync_status = get_sync_status;
|
|
@@ -5,6 +5,8 @@ import { TRPCAgent } from "../../../rpc/index";
|
|
|
5
5
|
import { PoolState } from "../../chia/farmer/farmer";
|
|
6
6
|
import { Receiver } from "../../chia/plot-sync/receiver";
|
|
7
7
|
import { Plot } from "../../chia/protocols/harvester_protocol";
|
|
8
|
+
import { GetMessageType, ResType } from "../../types";
|
|
9
|
+
import { TDaemon } from "../../../daemon/index";
|
|
8
10
|
export declare const chia_farmer_service = "chia_farmer";
|
|
9
11
|
export declare type chia_farmer_service = typeof chia_farmer_service;
|
|
10
12
|
export declare const get_signage_point_command = "get_signage_point";
|
|
@@ -23,14 +25,16 @@ export declare type TGetSignagePointResponse = {
|
|
|
23
25
|
};
|
|
24
26
|
proofs: [string, ProofOfSpace];
|
|
25
27
|
};
|
|
26
|
-
export declare
|
|
28
|
+
export declare type WsGetSignagePointMessage = GetMessageType<chia_farmer_service, get_signage_point_command, TGetSignagePointResponse>;
|
|
29
|
+
export declare function get_signage_point<T extends TRPCAgent | TDaemon>(agent: T, params: TGetSignagePointRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetSignagePointResponse, WsGetSignagePointMessage>>;
|
|
27
30
|
export declare const get_signage_points_command = "get_signage_points";
|
|
28
31
|
export declare type get_signage_points_command = typeof get_signage_points_command;
|
|
29
32
|
export declare type TGetSignagePointsRequest = {};
|
|
30
33
|
export declare type TGetSignagePointsResponse = {
|
|
31
34
|
signage_points: TGetSignagePointResponse[];
|
|
32
35
|
};
|
|
33
|
-
export declare
|
|
36
|
+
export declare type WsGetSignagePointsMessage = GetMessageType<chia_farmer_service, get_signage_points_command, TGetSignagePointsResponse>;
|
|
37
|
+
export declare function get_signage_points<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetSignagePointsResponse, WsGetSignagePointsMessage>>;
|
|
34
38
|
export declare const get_reward_targets_command = "get_reward_targets";
|
|
35
39
|
export declare type get_reward_targets_command = typeof get_reward_targets_command;
|
|
36
40
|
export declare type TGetRewardTargetRequest = {
|
|
@@ -46,7 +50,8 @@ export declare type TGetRewardTargetResponse = {
|
|
|
46
50
|
farmer_target: str;
|
|
47
51
|
pool_target: str;
|
|
48
52
|
};
|
|
49
|
-
export declare
|
|
53
|
+
export declare type WsGetRewardTargetsMessage = GetMessageType<chia_farmer_service, get_reward_targets_command, TGetRewardTargetResponse>;
|
|
54
|
+
export declare function get_reward_targets<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRewardTargetRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRewardTargetResponse, WsGetRewardTargetsMessage>>;
|
|
50
55
|
export declare const set_reward_targets_command = "set_reward_targets";
|
|
51
56
|
export declare type set_reward_targets_command = typeof set_reward_targets_command;
|
|
52
57
|
export declare type TSetRewardTargetRequest = {
|
|
@@ -54,14 +59,16 @@ export declare type TSetRewardTargetRequest = {
|
|
|
54
59
|
pool_target?: str;
|
|
55
60
|
};
|
|
56
61
|
export declare type TSetRewardTargetResponse = {};
|
|
57
|
-
export declare
|
|
62
|
+
export declare type WsSetRewardTargetsMessage = GetMessageType<chia_farmer_service, set_reward_targets_command, TSetRewardTargetResponse>;
|
|
63
|
+
export declare function set_reward_targets<T extends TRPCAgent | TDaemon>(agent: T, params: TSetRewardTargetRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TSetRewardTargetResponse, WsSetRewardTargetsMessage>>;
|
|
58
64
|
export declare const get_pool_state_command = "get_pool_state";
|
|
59
65
|
export declare type get_pool_state_command = typeof get_pool_state_command;
|
|
60
66
|
export declare type TGetPoolStateRequest = {};
|
|
61
67
|
export declare type TGetPoolStateResponse = {
|
|
62
68
|
pool_state: PoolState[];
|
|
63
69
|
};
|
|
64
|
-
export declare
|
|
70
|
+
export declare type WsGetPoolStateMessage = GetMessageType<chia_farmer_service, get_pool_state_command, TGetPoolStateResponse>;
|
|
71
|
+
export declare function get_pool_state<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetPoolStateResponse, WsGetPoolStateMessage>>;
|
|
65
72
|
export declare const set_payout_instructions_command = "set_payout_instructions";
|
|
66
73
|
export declare type set_payout_instructions_command = typeof set_payout_instructions_command;
|
|
67
74
|
export declare type TSetPayoutInstructionsRequest = {
|
|
@@ -69,20 +76,23 @@ export declare type TSetPayoutInstructionsRequest = {
|
|
|
69
76
|
payout_instructions: str;
|
|
70
77
|
};
|
|
71
78
|
export declare type TSetPayoutInstructionsResponse = {};
|
|
72
|
-
export declare
|
|
79
|
+
export declare type WsSetPayoutInstructionsMessage = GetMessageType<chia_farmer_service, set_payout_instructions_command, TSetPayoutInstructionsResponse>;
|
|
80
|
+
export declare function set_pool_payout_instructions<T extends TRPCAgent | TDaemon>(agent: T, params: TSetPayoutInstructionsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TSetPayoutInstructionsResponse, WsSetPayoutInstructionsMessage>>;
|
|
73
81
|
export declare const get_harvesters_command = "get_harvesters";
|
|
74
82
|
export declare type get_harvesters_command = typeof get_harvesters_command;
|
|
75
83
|
export declare type TGetHarvestersRequest = {};
|
|
76
84
|
export declare type TGetHarvestersResponse = {
|
|
77
85
|
harvesters: Receiver[];
|
|
78
86
|
};
|
|
79
|
-
export declare
|
|
87
|
+
export declare type WsGetHarvestersMessage = GetMessageType<chia_farmer_service, get_harvesters_command, TGetHarvestersResponse>;
|
|
88
|
+
export declare function get_harvesters<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetHarvestersResponse, WsGetHarvestersMessage>>;
|
|
80
89
|
export declare const get_harvesters_summary_command = "get_harvesters_summary";
|
|
81
90
|
export declare type get_harvesters_summary_command = typeof get_harvesters_summary_command;
|
|
82
91
|
export declare type TGetHarvestersSummaryResponse = {
|
|
83
92
|
harvesters: Receiver<true>[];
|
|
84
93
|
};
|
|
85
|
-
export declare
|
|
94
|
+
export declare type WsGetHarvestersSummaryMessage = GetMessageType<chia_farmer_service, get_harvesters_summary_command, TGetHarvestersSummaryResponse>;
|
|
95
|
+
export declare function get_harvesters_summary<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetHarvestersSummaryResponse, WsGetHarvestersSummaryMessage>>;
|
|
86
96
|
export declare const get_harvester_plots_valid_command = "get_harvester_plots_valid";
|
|
87
97
|
export declare type get_harvester_plots_valid_command = typeof get_harvester_plots_valid_command;
|
|
88
98
|
export declare type TGetHarvesterPlotsValidRequest = {
|
|
@@ -103,7 +113,8 @@ export declare type TGetHarvesterPlotsValidResponse = {
|
|
|
103
113
|
total_count: int;
|
|
104
114
|
plots: Plot[];
|
|
105
115
|
};
|
|
106
|
-
export declare
|
|
116
|
+
export declare type WsGetHarvesterPlotsValidMessage = GetMessageType<chia_farmer_service, get_harvester_plots_valid_command, TGetHarvesterPlotsValidResponse>;
|
|
117
|
+
export declare function get_harvester_plots_valid<T extends TRPCAgent | TDaemon>(agent: T, param: TGetHarvesterPlotsValidRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetHarvesterPlotsValidResponse, WsGetHarvesterPlotsValidMessage>>;
|
|
107
118
|
export declare const get_harvester_plots_invalid_command = "get_harvester_plots_invalid";
|
|
108
119
|
export declare type get_harvester_plots_invalid_command = typeof get_harvester_plots_invalid_command;
|
|
109
120
|
export declare type TGetHarvesterPlotsInvalidRequest = {
|
|
@@ -120,7 +131,8 @@ export declare type TGetHarvesterPlotsInvalidResponse = {
|
|
|
120
131
|
total_count: int;
|
|
121
132
|
plots: str[];
|
|
122
133
|
};
|
|
123
|
-
export declare
|
|
134
|
+
export declare type WsGetHarvesterPlotsInvalidMessage = GetMessageType<chia_farmer_service, get_harvester_plots_invalid_command, TGetHarvesterPlotsInvalidResponse>;
|
|
135
|
+
export declare function get_harvester_plots_invalid<T extends TRPCAgent | TDaemon>(agent: T, param: TGetHarvesterPlotsInvalidRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetHarvesterPlotsInvalidResponse, WsGetHarvesterPlotsInvalidMessage>>;
|
|
124
136
|
export declare const get_harvester_plots_keys_missing_command = "get_harvester_plots_keys_missing";
|
|
125
137
|
export declare type get_harvester_plots_keys_missing_command = typeof get_harvester_plots_keys_missing_command;
|
|
126
138
|
export declare type TGetHarvesterPlotsKeysMissingRequest = {
|
|
@@ -137,7 +149,8 @@ export declare type TGetHarvesterPlotsKeysMissingResponse = {
|
|
|
137
149
|
total_count: int;
|
|
138
150
|
plots: str[];
|
|
139
151
|
};
|
|
140
|
-
export declare
|
|
152
|
+
export declare type WsGetHarvesterPlotsKeysMissingMessage = GetMessageType<chia_farmer_service, get_harvester_plots_keys_missing_command, TGetHarvesterPlotsKeysMissingResponse>;
|
|
153
|
+
export declare function get_harvester_plots_keys_missing<T extends TRPCAgent | TDaemon>(agent: T, param: TGetHarvesterPlotsKeysMissingRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetHarvesterPlotsKeysMissingResponse, WsGetHarvesterPlotsKeysMissingMessage>>;
|
|
141
154
|
export declare const get_harvester_plots_duplicates_command = "get_harvester_plots_duplicates";
|
|
142
155
|
export declare type get_harvester_plots_duplicates_command = typeof get_harvester_plots_duplicates_command;
|
|
143
156
|
export declare type TGetHarvesterPlotsDuplicatesRequest = {
|
|
@@ -154,7 +167,8 @@ export declare type TGetHarvesterPlotsDuplicatesResponse = {
|
|
|
154
167
|
total_count: int;
|
|
155
168
|
plots: str[];
|
|
156
169
|
};
|
|
157
|
-
export declare
|
|
170
|
+
export declare type WsGetHarvesterPlotsDuplicatesMessage = GetMessageType<chia_farmer_service, get_harvester_plots_duplicates_command, TGetHarvesterPlotsDuplicatesResponse>;
|
|
171
|
+
export declare function get_harvester_plots_duplicates<T extends TRPCAgent | TDaemon>(agent: T, param: TGetHarvesterPlotsDuplicatesRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetHarvesterPlotsDuplicatesResponse, WsGetHarvesterPlotsDuplicatesMessage>>;
|
|
158
172
|
export declare const get_pool_login_link_command = "get_pool_login_link";
|
|
159
173
|
export declare type get_pool_login_link_command = typeof get_pool_login_link_command;
|
|
160
174
|
export declare type TGetPoolLinkRequest = {
|
|
@@ -163,4 +177,7 @@ export declare type TGetPoolLinkRequest = {
|
|
|
163
177
|
export declare type TGetPoolLinkResponse = {
|
|
164
178
|
login_link: str;
|
|
165
179
|
};
|
|
166
|
-
export declare
|
|
180
|
+
export declare type WsGetPoolLinkMessage = GetMessageType<chia_farmer_service, get_pool_login_link_command, TGetPoolLinkResponse>;
|
|
181
|
+
export declare function get_pool_login_link<T extends TRPCAgent | TDaemon>(agent: T, params: TGetPoolLinkRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetPoolLinkResponse, WsGetPoolLinkMessage>>;
|
|
182
|
+
export declare type RpcFarmerMessage = TGetRewardTargetResponse | TGetSignagePointResponse | TGetSignagePointsResponse | TSetRewardTargetResponse | TGetHarvestersResponse | TGetHarvestersSummaryResponse | TGetHarvesterPlotsValidResponse | TGetHarvesterPlotsInvalidResponse | TGetHarvesterPlotsKeysMissingResponse | TGetHarvesterPlotsDuplicatesResponse | TSetPayoutInstructionsResponse | TGetPoolStateResponse | TGetPoolLinkResponse;
|
|
183
|
+
export declare type RpcFarmerMessageOnWs = WsGetRewardTargetsMessage | WsGetSignagePointMessage | WsGetSignagePointsMessage | WsSetRewardTargetsMessage | WsGetHarvestersMessage | WsGetHarvestersSummaryMessage | WsGetHarvesterPlotsValidMessage | WsGetHarvesterPlotsInvalidMessage | WsGetHarvesterPlotsKeysMissingMessage | WsGetHarvesterPlotsDuplicatesMessage | WsSetPayoutInstructionsMessage | WsGetPoolStateMessage | WsGetPoolLinkMessage;
|