chia-agent 3.0.0 → 4.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 +119 -0
- package/README.md +5 -9
- package/api/chia/consensus/blockchain.d.ts +1 -0
- package/api/chia/{wallet/util/backup_utils.js → consensus/blockchain.js} +0 -0
- package/api/chia/consensus/cost_calculator.d.ts +1 -1
- package/api/chia/pools/pool_config.d.ts +0 -1
- package/api/chia/server/outbound_message.d.ts +1 -0
- package/api/chia/{wallet/util/trade_utils.js → server/outbound_message.js} +0 -0
- package/api/chia/timelord/types.d.ts +1 -0
- package/api/chia/timelord/types.js +2 -0
- package/api/chia/types/coin_record.d.ts +3 -1
- 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 +23 -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/full_node/index.d.ts +24 -6
- package/api/rpc/full_node/index.js +8 -1
- package/api/rpc/index.d.ts +13 -7
- package/api/rpc/index.js +30 -12
- package/api/rpc/wallet/index.d.ts +172 -112
- package/api/rpc/wallet/index.js +82 -47
- 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 +9 -3
- package/api/ws/farmer/index.js +15 -2
- 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 +52 -32
- 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/rpc/index.d.ts +4 -0
- package/rpc/index.js +9 -0
- package/api/chia/wallet/util/backup_utils.d.ts +0 -25
- package/api/chia/wallet/util/trade_utils.d.ts +0 -11
|
@@ -2,36 +2,32 @@ import { WalletInfo } from "../../chia/wallet/wallet_info";
|
|
|
2
2
|
import { Coin } from "../../chia/types/blockchain_format/coin";
|
|
3
3
|
import { bool, bytes, False, int, Optional, str, True, uint128, uint32, uint64, uint8 } from "../../chia/types/_python_types_";
|
|
4
4
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
5
|
-
import { TransactionRecord } from "../../chia/wallet/transaction_record";
|
|
5
|
+
import { TransactionRecord, TransactionRecordConvenience } from "../../chia/wallet/transaction_record";
|
|
6
6
|
import { SpendBundle } from "../../chia/types/spend_bundle";
|
|
7
|
-
import { BackupInfo } from "../../chia/wallet/util/backup_utils";
|
|
8
7
|
import { TRPCAgent } from "../../../rpc";
|
|
9
8
|
import { PoolWalletInfo } from "../../chia/pools/pool_wallet_info";
|
|
10
|
-
import {
|
|
9
|
+
import { TradeRecordConvenience } from "../../chia/wallet/trade_record";
|
|
10
|
+
import { CAT } from "../../chia/wallet/cat_wallet/cat_constants";
|
|
11
11
|
export declare const chia_wallet_service = "chia_wallet";
|
|
12
12
|
export declare type chia_wallet_service = typeof chia_wallet_service;
|
|
13
13
|
export declare const log_in_command = "log_in";
|
|
14
14
|
export declare type log_in_command = typeof log_in_command;
|
|
15
15
|
export declare type TLoginRequest = {
|
|
16
16
|
fingerprint: int;
|
|
17
|
-
type: "skip";
|
|
18
|
-
host: str;
|
|
19
|
-
} | {
|
|
20
|
-
fingerprint: int;
|
|
21
|
-
type: "restore_backup";
|
|
22
|
-
host: str;
|
|
23
|
-
file_path: str;
|
|
24
17
|
};
|
|
25
18
|
export declare type TLoginResponse = {
|
|
26
19
|
fingerprint: int;
|
|
27
20
|
} | {
|
|
28
21
|
success: False;
|
|
29
|
-
error: "
|
|
30
|
-
} | {
|
|
31
|
-
backup_info: BackupInfo;
|
|
32
|
-
backup_path: str;
|
|
22
|
+
error: "Unknown Error";
|
|
33
23
|
};
|
|
34
24
|
export declare function log_in(agent: TRPCAgent, data: TLoginRequest): Promise<TLoginResponse>;
|
|
25
|
+
export declare const get_logged_in_fingerprint_command = "get_logged_in_fingerprint";
|
|
26
|
+
export declare type get_logged_in_fingerprint_command = typeof get_logged_in_fingerprint_command;
|
|
27
|
+
export declare type TGetLoggedInFingerprintResponse = {
|
|
28
|
+
fingerprint: Optional<int>;
|
|
29
|
+
};
|
|
30
|
+
export declare function get_logged_in_fingerprint(agent: TRPCAgent): Promise<TGetLoggedInFingerprintResponse>;
|
|
35
31
|
export declare const get_public_keys_command = "get_public_keys";
|
|
36
32
|
export declare type get_public_keys_command = typeof get_public_keys_command;
|
|
37
33
|
export declare type TGetPublicKeysRequest = {};
|
|
@@ -73,11 +69,6 @@ export declare const add_key_command = "add_key";
|
|
|
73
69
|
export declare type add_key_command = typeof add_key_command;
|
|
74
70
|
export declare type TAddKeyRequest = {
|
|
75
71
|
mnemonic: str[];
|
|
76
|
-
type: "new_wallet" | "skip";
|
|
77
|
-
} | {
|
|
78
|
-
mnemonic: str[];
|
|
79
|
-
type: "restore_backup";
|
|
80
|
-
file_path: str;
|
|
81
72
|
};
|
|
82
73
|
export declare type TAddKeyResponse = {
|
|
83
74
|
success: false;
|
|
@@ -130,6 +121,13 @@ export declare type TGetHeightInfoResponse = {
|
|
|
130
121
|
height: uint32;
|
|
131
122
|
};
|
|
132
123
|
export declare function get_height_info(agent: TRPCAgent): Promise<TGetHeightInfoResponse>;
|
|
124
|
+
export declare const push_tx_command = "push_tx";
|
|
125
|
+
export declare type push_tx_command = typeof push_tx_command;
|
|
126
|
+
export declare type TPushTxRequest = {
|
|
127
|
+
spend_bundle: str;
|
|
128
|
+
};
|
|
129
|
+
export declare type TPushTxResponse = {};
|
|
130
|
+
export declare function push_tx(agent: TRPCAgent, data: TPushTxRequest): Promise<TPushTxResponse>;
|
|
133
131
|
export declare const farm_block_command = "farm_block";
|
|
134
132
|
export declare type farm_block_command = typeof farm_block_command;
|
|
135
133
|
export declare type TFarmBlockRequest = {
|
|
@@ -159,28 +157,23 @@ export declare type TGetWalletsResponse = {
|
|
|
159
157
|
wallets: WalletInfo[];
|
|
160
158
|
};
|
|
161
159
|
export declare function get_wallets(agent: TRPCAgent): Promise<TGetWalletsResponse>;
|
|
162
|
-
export declare type
|
|
163
|
-
host: str;
|
|
160
|
+
export declare type TCreate_New_CAT_WalletRequest = {
|
|
164
161
|
fee?: uint64;
|
|
165
|
-
wallet_type: "
|
|
162
|
+
wallet_type: "cat_wallet";
|
|
166
163
|
mode: "new";
|
|
167
164
|
amount: uint64;
|
|
168
165
|
} | {
|
|
169
|
-
host: str;
|
|
170
166
|
fee?: uint64;
|
|
171
|
-
wallet_type: "
|
|
167
|
+
wallet_type: "cat_wallet";
|
|
172
168
|
mode: "existing";
|
|
173
|
-
|
|
169
|
+
asset_id: str;
|
|
174
170
|
};
|
|
175
|
-
export declare type
|
|
171
|
+
export declare type TCreate_New_CAT_WalletResponse = {
|
|
176
172
|
type: uint8;
|
|
177
|
-
|
|
173
|
+
asset_id: str;
|
|
178
174
|
wallet_id: uint32;
|
|
179
|
-
} | {
|
|
180
|
-
type: uint8;
|
|
181
175
|
};
|
|
182
176
|
export declare type TCreate_New_RL_WalletRequest = {
|
|
183
|
-
host: str;
|
|
184
177
|
fee?: uint64;
|
|
185
178
|
wallet_type: "rl_wallet";
|
|
186
179
|
rl_type: "admin";
|
|
@@ -189,7 +182,6 @@ export declare type TCreate_New_RL_WalletRequest = {
|
|
|
189
182
|
pubkey: str;
|
|
190
183
|
amount: int;
|
|
191
184
|
} | {
|
|
192
|
-
host: str;
|
|
193
185
|
fee?: uint64;
|
|
194
186
|
wallet_type: "rl_wallet";
|
|
195
187
|
rl_type: "user";
|
|
@@ -206,7 +198,6 @@ export declare type TCreate_New_RL_WalletResponse = {
|
|
|
206
198
|
pubkey: str;
|
|
207
199
|
};
|
|
208
200
|
export declare type TCreate_New_DID_WalletRequest = {
|
|
209
|
-
host: str;
|
|
210
201
|
fee?: uint64;
|
|
211
202
|
wallet_type: "did_wallet";
|
|
212
203
|
did_type: "new";
|
|
@@ -214,7 +205,6 @@ export declare type TCreate_New_DID_WalletRequest = {
|
|
|
214
205
|
num_of_backup_ids_needed: uint64;
|
|
215
206
|
amount: int;
|
|
216
207
|
} | {
|
|
217
|
-
host: str;
|
|
218
208
|
fee?: uint64;
|
|
219
209
|
wallet_type: "did_wallet";
|
|
220
210
|
did_type: "recovery";
|
|
@@ -238,7 +228,6 @@ export declare type TCreate_New_DID_WalletResponse = {
|
|
|
238
228
|
num_verifications_required: uint64;
|
|
239
229
|
};
|
|
240
230
|
export declare type TCreate_New_Pool_WalletRequest = {
|
|
241
|
-
host: str;
|
|
242
231
|
fee?: uint64;
|
|
243
232
|
wallet_type: "pool_wallet";
|
|
244
233
|
mode: "new";
|
|
@@ -253,7 +242,6 @@ export declare type TCreate_New_Pool_WalletRequest = {
|
|
|
253
242
|
p2_singleton_delayed_ph?: str;
|
|
254
243
|
p2_singleton_delay_time?: uint64;
|
|
255
244
|
} | {
|
|
256
|
-
host: str;
|
|
257
245
|
fee?: uint64;
|
|
258
246
|
wallet_type: "pool_wallet";
|
|
259
247
|
mode: "recovery";
|
|
@@ -266,8 +254,8 @@ export declare type TCreate_New_Pool_WalletResponse = {
|
|
|
266
254
|
};
|
|
267
255
|
export declare const create_new_wallet_command = "create_new_wallet";
|
|
268
256
|
export declare type create_new_wallet_command = typeof create_new_wallet_command;
|
|
269
|
-
export declare type TCreateNewWalletRequest =
|
|
270
|
-
export declare type TCreateNewWalletResponse =
|
|
257
|
+
export declare type TCreateNewWalletRequest = TCreate_New_CAT_WalletRequest | TCreate_New_RL_WalletRequest | TCreate_New_DID_WalletRequest | TCreate_New_Pool_WalletRequest;
|
|
258
|
+
export declare type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_RL_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_Pool_WalletResponse;
|
|
271
259
|
export declare function create_new_wallet(agent: TRPCAgent, data: TCreateNewWalletRequest): Promise<TCreateNewWalletResponse>;
|
|
272
260
|
export declare const get_wallet_balance_command = "get_wallet_balance";
|
|
273
261
|
export declare type get_wallet_balance_command = typeof get_wallet_balance_command;
|
|
@@ -284,6 +272,7 @@ export declare type TGetWalletBalanceResponse = {
|
|
|
284
272
|
max_send_amount: uint64;
|
|
285
273
|
unspent_coin_count: int;
|
|
286
274
|
pending_coin_removal_count: int;
|
|
275
|
+
fingerprint?: int;
|
|
287
276
|
};
|
|
288
277
|
};
|
|
289
278
|
export declare function get_wallet_balance(agent: TRPCAgent, data: TGetWalletBalanceRequest): Promise<TGetWalletBalanceResponse>;
|
|
@@ -293,7 +282,7 @@ export declare type TGetTransactionRequest = {
|
|
|
293
282
|
transaction_id: str;
|
|
294
283
|
};
|
|
295
284
|
export declare type TGetTransactionResponse = {
|
|
296
|
-
transaction:
|
|
285
|
+
transaction: TransactionRecordConvenience;
|
|
297
286
|
transaction_id: TransactionRecord["name"];
|
|
298
287
|
};
|
|
299
288
|
export declare function get_transaction(agent: TRPCAgent, data: TGetTransactionRequest): Promise<TGetTransactionResponse>;
|
|
@@ -303,11 +292,12 @@ export declare type TGetTransactionsRequest = {
|
|
|
303
292
|
wallet_id: int;
|
|
304
293
|
start?: int;
|
|
305
294
|
end?: int;
|
|
295
|
+
sort_key?: str;
|
|
296
|
+
reverse?: bool;
|
|
297
|
+
to_address?: str;
|
|
306
298
|
};
|
|
307
299
|
export declare type TGetTransactionsResponse = {
|
|
308
|
-
transactions:
|
|
309
|
-
to_address: string;
|
|
310
|
-
}>;
|
|
300
|
+
transactions: TransactionRecordConvenience[];
|
|
311
301
|
wallet_id: int;
|
|
312
302
|
};
|
|
313
303
|
export declare function get_transactions(agent: TRPCAgent, data: TGetTransactionsRequest): Promise<TGetTransactionsResponse>;
|
|
@@ -327,11 +317,12 @@ export declare type send_transaction_command = typeof send_transaction_command;
|
|
|
327
317
|
export declare type TSendTransactionRequest = {
|
|
328
318
|
wallet_id: int;
|
|
329
319
|
amount: int;
|
|
330
|
-
fee
|
|
320
|
+
fee: int;
|
|
331
321
|
address: str;
|
|
322
|
+
memos?: str[];
|
|
332
323
|
};
|
|
333
324
|
export declare type TSendTransactionResponse = {
|
|
334
|
-
transaction:
|
|
325
|
+
transaction: TransactionRecordConvenience;
|
|
335
326
|
transaction_id: TransactionRecord["name"];
|
|
336
327
|
};
|
|
337
328
|
export declare function send_transaction(agent: TRPCAgent, data: TSendTransactionRequest): Promise<TSendTransactionResponse>;
|
|
@@ -342,27 +333,22 @@ export declare type TSendTransactionMultiRequest = {
|
|
|
342
333
|
additions: TAdditions[];
|
|
343
334
|
fee?: uint64;
|
|
344
335
|
coins?: Coin[];
|
|
336
|
+
coin_announcements?: TCoinAnnouncement[];
|
|
337
|
+
puzzle_announcements?: TPuzzleAnnouncement[];
|
|
345
338
|
};
|
|
346
339
|
export declare type TSendTransactionMultiResponse = {
|
|
347
|
-
transaction:
|
|
348
|
-
transaction_id:
|
|
340
|
+
transaction: TransactionRecordConvenience;
|
|
341
|
+
transaction_id: TransactionRecordConvenience["name"];
|
|
349
342
|
};
|
|
350
343
|
export declare function send_transaction_multi(agent: TRPCAgent, data: TSendTransactionMultiRequest): Promise<TSendTransactionMultiResponse>;
|
|
351
|
-
export declare const create_backup_command = "create_backup";
|
|
352
|
-
export declare type create_backup_command = typeof create_backup_command;
|
|
353
|
-
export declare type TCreateBackupRequest = {
|
|
354
|
-
file_path: str;
|
|
355
|
-
};
|
|
356
|
-
export declare type TCreateBackupResponse = {};
|
|
357
|
-
export declare function create_backup(agent: TRPCAgent, data: TCreateBackupRequest): Promise<TCreateBackupResponse>;
|
|
358
344
|
export declare const get_transaction_count_command = "get_transaction_count";
|
|
359
345
|
export declare type get_transaction_count_command = typeof get_transaction_count_command;
|
|
360
346
|
export declare type TGetTransactionCountRequest = {
|
|
361
347
|
wallet_id: int;
|
|
362
348
|
};
|
|
363
349
|
export declare type TGetTransactionCountResponse = {
|
|
364
|
-
wallet_id: int;
|
|
365
350
|
count: int;
|
|
351
|
+
wallet_id: int;
|
|
366
352
|
};
|
|
367
353
|
export declare function get_transaction_count(agent: TRPCAgent, data: TGetTransactionCountRequest): Promise<TGetTransactionCountResponse>;
|
|
368
354
|
export declare const get_farmed_amount_command = "get_farmed_amount";
|
|
@@ -379,6 +365,17 @@ export declare function get_farmed_amount(agent: TRPCAgent): Promise<TGetFarmedA
|
|
|
379
365
|
export declare type TAdditions = {
|
|
380
366
|
amount: uint64;
|
|
381
367
|
puzzle_hash: str;
|
|
368
|
+
memos?: str[];
|
|
369
|
+
};
|
|
370
|
+
export declare type TCoinAnnouncement = {
|
|
371
|
+
coin_id: str;
|
|
372
|
+
message: str;
|
|
373
|
+
morph_bytes?: str;
|
|
374
|
+
};
|
|
375
|
+
export declare type TPuzzleAnnouncement = {
|
|
376
|
+
puzzle_hash: str;
|
|
377
|
+
message: str;
|
|
378
|
+
morph_bytes?: str;
|
|
382
379
|
};
|
|
383
380
|
export declare const create_signed_transaction_command = "create_signed_transaction";
|
|
384
381
|
export declare type create_signed_transaction_command = typeof create_signed_transaction_command;
|
|
@@ -386,9 +383,11 @@ export declare type TCreateSignedTransactionRequest = {
|
|
|
386
383
|
additions: TAdditions[];
|
|
387
384
|
fee?: uint64;
|
|
388
385
|
coins?: Coin[];
|
|
386
|
+
coin_announcements?: TCoinAnnouncement[];
|
|
387
|
+
puzzle_announcements?: TPuzzleAnnouncement[];
|
|
389
388
|
};
|
|
390
389
|
export declare type TCreateSignedTransactionResponse = {
|
|
391
|
-
signed_tx:
|
|
390
|
+
signed_tx: TransactionRecordConvenience;
|
|
392
391
|
};
|
|
393
392
|
export declare function create_signed_transaction(agent: TRPCAgent, data: TCreateSignedTransactionRequest): Promise<TCreateSignedTransactionResponse>;
|
|
394
393
|
export declare const delete_unconfirmed_transactions_command = "delete_unconfirmed_transactions";
|
|
@@ -398,97 +397,155 @@ export declare type TDeleteUnconfirmedTransactionsRequest = {
|
|
|
398
397
|
};
|
|
399
398
|
export declare type TDeleteUnconfirmedTransactionsResponse = {};
|
|
400
399
|
export declare function delete_unconfirmed_transactions(agent: TRPCAgent, data: TDeleteUnconfirmedTransactionsRequest): Promise<TDeleteUnconfirmedTransactionsResponse>;
|
|
401
|
-
export declare const
|
|
402
|
-
export declare type
|
|
403
|
-
export declare type
|
|
400
|
+
export declare const cat_set_name_command = "cat_set_name";
|
|
401
|
+
export declare type cat_set_name_command = typeof cat_set_name_command;
|
|
402
|
+
export declare type TCatSetNameRequest = {
|
|
404
403
|
wallet_id: int;
|
|
405
404
|
name: str;
|
|
406
405
|
};
|
|
407
|
-
export declare type
|
|
406
|
+
export declare type TCatSetNameResponse = {
|
|
408
407
|
wallet_id: int;
|
|
409
408
|
};
|
|
410
|
-
export declare function
|
|
411
|
-
export declare const
|
|
412
|
-
export declare type
|
|
413
|
-
export declare type
|
|
409
|
+
export declare function cat_set_name(agent: TRPCAgent, data: TCatSetNameRequest): Promise<TCatSetNameResponse>;
|
|
410
|
+
export declare const cat_asset_id_to_name_command = "cat_asset_id_to_name";
|
|
411
|
+
export declare type cat_asset_id_to_name_command = typeof cat_asset_id_to_name_command;
|
|
412
|
+
export declare type TCatAssetIdToNameRequest = {
|
|
413
|
+
asset_id: str;
|
|
414
|
+
};
|
|
415
|
+
export declare type TCatAssetIdToNameResponse = {
|
|
416
|
+
wallet_id: Optional<uint32>;
|
|
417
|
+
name: str;
|
|
418
|
+
};
|
|
419
|
+
export declare function cat_asset_id_to_name(agent: TRPCAgent, data: TCatAssetIdToNameRequest): Promise<TCatAssetIdToNameResponse>;
|
|
420
|
+
export declare const cat_get_name_command = "cat_get_name";
|
|
421
|
+
export declare type cat_get_name_command = typeof cat_get_name_command;
|
|
422
|
+
export declare type TCatGetNameRequest = {
|
|
414
423
|
wallet_id: int;
|
|
415
424
|
};
|
|
416
|
-
export declare type
|
|
425
|
+
export declare type TCatGetNameResponse = {
|
|
417
426
|
wallet_id: int;
|
|
418
427
|
name: str;
|
|
419
428
|
};
|
|
420
|
-
export declare function
|
|
421
|
-
export declare const
|
|
422
|
-
export declare type
|
|
423
|
-
export declare type
|
|
429
|
+
export declare function cat_get_name(agent: TRPCAgent, data: TCatGetNameRequest): Promise<TCatGetNameResponse>;
|
|
430
|
+
export declare const cat_spend_command = "cat_spend";
|
|
431
|
+
export declare type cat_spend_command = typeof cat_spend_command;
|
|
432
|
+
export declare type TCatSpendRequest = {
|
|
424
433
|
wallet_id: int;
|
|
425
434
|
inner_address: str;
|
|
426
|
-
|
|
427
|
-
|
|
435
|
+
memos?: str[];
|
|
436
|
+
amount: uint64;
|
|
437
|
+
fee: uint64;
|
|
428
438
|
};
|
|
429
|
-
export declare type
|
|
430
|
-
transaction:
|
|
439
|
+
export declare type TCatSpendResponse = {
|
|
440
|
+
transaction: TransactionRecordConvenience;
|
|
431
441
|
transaction_id: TransactionRecord["name"];
|
|
432
442
|
};
|
|
433
|
-
export declare function
|
|
434
|
-
export declare const
|
|
435
|
-
export declare type
|
|
436
|
-
export declare type
|
|
443
|
+
export declare function cat_spend(agent: TRPCAgent, data: TCatSpendRequest): Promise<TCatSpendResponse>;
|
|
444
|
+
export declare const cat_get_asset_id_command = "cat_get_asset_id";
|
|
445
|
+
export declare type cat_get_asset_id_command = typeof cat_get_asset_id_command;
|
|
446
|
+
export declare type TCatGetAssetIdRequest = {
|
|
437
447
|
wallet_id: int;
|
|
438
448
|
};
|
|
439
|
-
export declare type
|
|
440
|
-
|
|
449
|
+
export declare type TCatGetAssetIdResponse = {
|
|
450
|
+
asset_id: str;
|
|
441
451
|
wallet_id: int;
|
|
442
452
|
};
|
|
443
|
-
export declare function
|
|
453
|
+
export declare function cat_get_asset_id(agent: TRPCAgent, data: TCatGetAssetIdRequest): Promise<TCatGetAssetIdResponse>;
|
|
444
454
|
export declare const create_offer_for_ids_command = "create_offer_for_ids";
|
|
445
455
|
export declare type create_offer_for_ids_command = typeof create_offer_for_ids_command;
|
|
446
456
|
export declare type TCreateOfferForIdsRequest = {
|
|
447
|
-
|
|
448
|
-
|
|
457
|
+
offer: Record<int, int>;
|
|
458
|
+
fee?: uint64;
|
|
459
|
+
validate_only?: bool;
|
|
460
|
+
};
|
|
461
|
+
export declare type TCreateOfferForIdsResponse = {
|
|
462
|
+
offer: str;
|
|
463
|
+
trade_record: TradeRecordConvenience;
|
|
449
464
|
};
|
|
450
|
-
export declare type TCreateOfferForIdsResponse = {};
|
|
451
465
|
export declare function create_offer_for_ids(agent: TRPCAgent, data: TCreateOfferForIdsRequest): Promise<TCreateOfferForIdsResponse>;
|
|
452
|
-
export declare const
|
|
453
|
-
export declare type
|
|
454
|
-
export declare type
|
|
455
|
-
|
|
466
|
+
export declare const get_offer_summary_command = "get_offer_summary";
|
|
467
|
+
export declare type get_offer_summary_command = typeof get_offer_summary_command;
|
|
468
|
+
export declare type TGetOfferSummaryRequest = {
|
|
469
|
+
offer: str;
|
|
470
|
+
};
|
|
471
|
+
export declare type TGetOfferSummaryResponse = {
|
|
472
|
+
summary: {
|
|
473
|
+
offered: Record<str, int>;
|
|
474
|
+
requested: Record<str, int>;
|
|
475
|
+
fees: int;
|
|
476
|
+
};
|
|
456
477
|
};
|
|
457
|
-
export declare
|
|
458
|
-
|
|
478
|
+
export declare function get_offer_summary(agent: TRPCAgent, data: TGetOfferSummaryRequest): Promise<TGetOfferSummaryResponse>;
|
|
479
|
+
export declare const check_offer_validity_command = "check_offer_validity";
|
|
480
|
+
export declare type check_offer_validity_command = typeof check_offer_validity_command;
|
|
481
|
+
export declare type TCheckOfferValidityRequest = {
|
|
482
|
+
offer: str;
|
|
459
483
|
};
|
|
460
|
-
export declare
|
|
461
|
-
|
|
462
|
-
export declare type respond_to_offer_command = typeof respond_to_offer_command;
|
|
463
|
-
export declare type TResponseToOfferRequest = {
|
|
464
|
-
filename: str;
|
|
484
|
+
export declare type TCheckOfferValidityResponse = {
|
|
485
|
+
valid: bool;
|
|
465
486
|
};
|
|
466
|
-
export declare
|
|
467
|
-
export declare
|
|
468
|
-
export declare
|
|
469
|
-
export declare type
|
|
470
|
-
|
|
471
|
-
|
|
487
|
+
export declare function check_offer_validity(agent: TRPCAgent, data: TCheckOfferValidityRequest): Promise<TCheckOfferValidityResponse>;
|
|
488
|
+
export declare const take_offer_command = "take_offer";
|
|
489
|
+
export declare type take_offer_command = typeof take_offer_command;
|
|
490
|
+
export declare type TTakeOfferRequest = {
|
|
491
|
+
offer: str;
|
|
492
|
+
fee?: uint64;
|
|
493
|
+
};
|
|
494
|
+
export declare type TTakeOfferResponse = {
|
|
495
|
+
trade_record: TradeRecordConvenience;
|
|
472
496
|
};
|
|
473
|
-
export declare
|
|
474
|
-
|
|
497
|
+
export declare function take_offer(agent: TRPCAgent, data: TTakeOfferRequest): Promise<TTakeOfferResponse>;
|
|
498
|
+
export declare const get_offer_command = "get_offer";
|
|
499
|
+
export declare type get_offer_command = typeof get_offer_command;
|
|
500
|
+
export declare type TGetOfferRequest = {
|
|
501
|
+
trade_id: str;
|
|
502
|
+
file_contents?: bool;
|
|
475
503
|
};
|
|
476
|
-
export declare
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
export declare type TGetAllTradesRequest = {};
|
|
480
|
-
export declare type TGetAllTradesResponse = {
|
|
481
|
-
trades: TradeRecordInJson[];
|
|
504
|
+
export declare type TGetOfferResponse = {
|
|
505
|
+
trade_record: TradeRecordConvenience;
|
|
506
|
+
offer: Optional<str>;
|
|
482
507
|
};
|
|
483
|
-
export declare function
|
|
484
|
-
export declare const
|
|
485
|
-
export declare type
|
|
486
|
-
export declare type
|
|
508
|
+
export declare function get_offer(agent: TRPCAgent, data: TGetOfferRequest): Promise<TGetOfferResponse>;
|
|
509
|
+
export declare const get_all_offers_command = "get_all_offers";
|
|
510
|
+
export declare type get_all_offers_command = typeof get_all_offers_command;
|
|
511
|
+
export declare type TGetAllOffersRequest = {
|
|
512
|
+
start?: int;
|
|
513
|
+
end?: int;
|
|
514
|
+
exclude_my_offers?: bool;
|
|
515
|
+
exclude_taken_offers?: bool;
|
|
516
|
+
include_completed?: bool;
|
|
517
|
+
sort_key?: str;
|
|
518
|
+
reverse?: bool;
|
|
519
|
+
file_contents?: bool;
|
|
520
|
+
};
|
|
521
|
+
export declare type TGetAllOffersResponse = {
|
|
522
|
+
trade_records: TradeRecordConvenience[];
|
|
523
|
+
offers: Optional<str[]>;
|
|
524
|
+
};
|
|
525
|
+
export declare function get_all_offers(agent: TRPCAgent, data: TGetAllOffersRequest): Promise<TGetAllOffersResponse>;
|
|
526
|
+
export declare const get_offers_count_command = "get_offers_count";
|
|
527
|
+
export declare type get_offers_count_command = typeof get_offers_count_command;
|
|
528
|
+
export declare type TGetOffersCountResponse = {
|
|
529
|
+
total: int;
|
|
530
|
+
my_offers_count: int;
|
|
531
|
+
taken_offers_count: int;
|
|
532
|
+
};
|
|
533
|
+
export declare function get_offers_count(agent: TRPCAgent): Promise<TGetOffersCountResponse>;
|
|
534
|
+
export declare const cancel_offer_command = "cancel_offer";
|
|
535
|
+
export declare type cancel_offer_command = typeof cancel_offer_command;
|
|
536
|
+
export declare type TCancelOfferRequest = {
|
|
487
537
|
secure: bool;
|
|
488
538
|
trade_id: str;
|
|
539
|
+
fee?: uint64;
|
|
540
|
+
};
|
|
541
|
+
export declare type TCancelOfferResponse = {};
|
|
542
|
+
export declare function cancel_offer(agent: TRPCAgent, data: TCancelOfferRequest): Promise<TCancelOfferResponse>;
|
|
543
|
+
export declare const get_cat_list_command = "get_cat_list";
|
|
544
|
+
export declare type get_cat_list_command = typeof get_cat_list_command;
|
|
545
|
+
export declare type TGetCatListResponse = {
|
|
546
|
+
cat_list: CAT[];
|
|
489
547
|
};
|
|
490
|
-
export declare
|
|
491
|
-
export declare function cancel_trade(agent: TRPCAgent, data: TCancelTradeRequest): Promise<TCancelTradeResponse>;
|
|
548
|
+
export declare function get_cat_list(agent: TRPCAgent): Promise<TGetCatListResponse>;
|
|
492
549
|
export declare const did_update_recovery_ids_command = "did_update_recovery_ids";
|
|
493
550
|
export declare type did_update_recovery_ids_command = typeof did_update_recovery_ids_command;
|
|
494
551
|
export declare type TDidUpdateRecoveryIdsRequest = {
|
|
@@ -647,6 +704,7 @@ export declare type TPwJoinPoolRequest = {
|
|
|
647
704
|
export declare type TPwJoinPoolResponse = {
|
|
648
705
|
total_fee: uint64;
|
|
649
706
|
transaction: TransactionRecord;
|
|
707
|
+
fee_transaction: Optional<TransactionRecord>;
|
|
650
708
|
} | {
|
|
651
709
|
success: False;
|
|
652
710
|
error: "not_initialized";
|
|
@@ -661,6 +719,7 @@ export declare type TPwSelfPoolRequest = {
|
|
|
661
719
|
export declare type TPwSelfPoolResponse = {
|
|
662
720
|
total_fee: uint64;
|
|
663
721
|
transaction: TransactionRecord;
|
|
722
|
+
fee_transaction: Optional<TransactionRecord>;
|
|
664
723
|
} | {
|
|
665
724
|
success: False;
|
|
666
725
|
error: "not_initialized";
|
|
@@ -675,6 +734,7 @@ export declare type TPwAbsorbRewardsRequest = {
|
|
|
675
734
|
export declare type TPwAbsorbRewardsResponse = {
|
|
676
735
|
state: PoolWalletInfo;
|
|
677
736
|
transaction: TransactionRecord;
|
|
737
|
+
fee_transaction: Optional<TransactionRecord>;
|
|
678
738
|
} | {
|
|
679
739
|
success: False;
|
|
680
740
|
error: "not_initialized";
|