chia-agent 3.0.1 → 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +5 -9
  3. package/api/chia/consensus/blockchain.d.ts +1 -0
  4. package/api/chia/{wallet/util/backup_utils.js → consensus/blockchain.js} +0 -0
  5. package/api/chia/consensus/cost_calculator.d.ts +1 -1
  6. package/api/chia/pools/pool_config.d.ts +0 -1
  7. package/api/chia/server/outbound_message.d.ts +1 -0
  8. package/api/chia/{wallet/util/trade_utils.js → server/outbound_message.js} +0 -0
  9. package/api/chia/timelord/types.d.ts +1 -0
  10. package/api/chia/timelord/types.js +2 -0
  11. package/api/chia/types/coin_record.d.ts +3 -1
  12. package/api/chia/wallet/cat_wallet/cat_constants.d.ts +6 -0
  13. package/api/chia/wallet/cat_wallet/cat_constants.js +2 -0
  14. package/api/chia/wallet/trade_record.d.ts +23 -0
  15. package/api/chia/wallet/trade_record.js +1 -0
  16. package/api/chia/wallet/transaction_record.d.ts +7 -2
  17. package/api/chia/wallet/util/wallet_types.d.ts +1 -1
  18. package/api/chia/wallet/util/wallet_types.js +1 -1
  19. package/api/rpc/common/index.d.ts +40 -0
  20. package/api/rpc/common/index.js +48 -0
  21. package/api/rpc/crawler/index.d.ts +29 -0
  22. package/api/rpc/crawler/index.js +27 -0
  23. package/api/rpc/full_node/index.d.ts +24 -6
  24. package/api/rpc/full_node/index.js +8 -1
  25. package/api/rpc/index.d.ts +13 -7
  26. package/api/rpc/index.js +30 -12
  27. package/api/rpc/wallet/index.d.ts +172 -112
  28. package/api/rpc/wallet/index.js +82 -47
  29. package/api/types.d.ts +16 -0
  30. package/api/types.js +2 -1
  31. package/api/ws/crawler/index.d.ts +25 -0
  32. package/api/ws/crawler/index.js +40 -0
  33. package/api/ws/daemon/index.d.ts +8 -0
  34. package/api/ws/daemon/index.js +9 -2
  35. package/api/ws/farmer/index.d.ts +9 -3
  36. package/api/ws/farmer/index.js +15 -2
  37. package/api/ws/full_node/index.d.ts +50 -4
  38. package/api/ws/full_node/index.js +40 -1
  39. package/api/ws/harvester/index.d.ts +9 -3
  40. package/api/ws/harvester/index.js +14 -1
  41. package/api/ws/index.d.ts +22 -16
  42. package/api/ws/index.js +52 -32
  43. package/api/ws/timelord/index.d.ts +38 -0
  44. package/api/ws/timelord/index.js +66 -0
  45. package/api/ws/wallet/index.d.ts +32 -6
  46. package/api/ws/wallet/index.js +42 -3
  47. package/daemon/connection.d.ts +2 -2
  48. package/daemon/index.d.ts +6 -6
  49. package/index.d.ts +0 -2
  50. package/package.json +2 -2
  51. package/api/chia/wallet/util/backup_utils.d.ts +0 -25
  52. package/api/chia/wallet/util/trade_utils.d.ts +0 -11
package/api/rpc/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.did_create_attest = exports.delete_key = exports.delete_all_keys = exports.create_signed_transaction = exports.create_offer_for_ids = exports.create_new_wallet = exports.create_backup = exports.cc_spend = exports.cc_set_name = exports.cc_get_name = exports.cc_get_colour = exports.cancel_trade = exports.add_rate_limited_funds = exports.add_key = exports.chia_wallet_service = exports.remove_plot_directory = exports.refresh_plots = exports.get_plots = exports.get_plot_directories = exports.delete_plot = exports.add_plot_directory = exports.chia_harvester_service = exports.push_tx = exports.get_unfinished_block_headers = exports.get_network_space = exports.get_network_info_of_full_node = exports.get_mempool_item_by_tx_id = exports.get_initial_freeze_period_of_full_node = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hash = exports.get_coin_record_by_name = exports.get_recent_signage_point_or_eos = exports.get_blocks = exports.get_blockchain_state = exports.get_block_records = exports.get_block_record_by_height = exports.get_block_record = exports.get_block = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_additions_and_removals = exports.chia_full_node_service = exports.get_pool_state = exports.set_pool_payout_instructions = exports.get_harvesters = exports.set_reward_targets = exports.get_signage_points = exports.get_signage_point = exports.get_reward_targets = exports.chia_farmer_service = void 0;
4
- exports.send_transaction_multi = exports.send_transaction = exports.send_clawback_transaction = exports.rl_set_user_info = exports.respond_to_offer = exports.pw_status = exports.pw_absorb_rewards = exports.pw_self_pool = exports.pw_join_pool = exports.log_in = exports.get_wallets = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction_count = exports.get_transaction = exports.get_trade = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = exports.get_next_address = exports.get_network_info_of_wallet = exports.get_initial_freeze_period_of_wallet = exports.get_height_info = exports.get_farmed_amount = exports.get_discrepancies_for_offer = exports.get_all_trades = exports.generate_mnemonic = exports.farm_block = exports.did_update_recovery_ids = exports.did_spend = exports.did_recovery_spend = exports.did_get_recovery_list = exports.did_get_pubkey = exports.did_get_information_needed_for_recovery = exports.did_get_did = exports.did_create_backup_file = void 0;
3
+ exports.delete_all_keys = exports.create_signed_transaction = exports.create_offer_for_ids = exports.create_new_wallet = exports.check_offer_validity = exports.cat_spend = exports.cat_set_name = exports.cat_asset_id_to_name = exports.cat_get_name = exports.cat_get_asset_id = exports.cancel_offer = exports.add_rate_limited_funds = exports.add_key = exports.chia_wallet_service = exports.remove_plot_directory = exports.refresh_plots = exports.get_plots = exports.get_plot_directories = exports.delete_plot = exports.add_plot_directory = exports.chia_harvester_service = exports.push_tx = exports.get_unfinished_block_headers = exports.get_network_space = exports.get_network_info_of_full_node = exports.get_mempool_item_by_tx_id = exports.get_initial_freeze_period_of_full_node = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hash = exports.get_coin_record_by_name = exports.get_recent_signage_point_or_eos = exports.get_block_count_metrics = exports.get_blocks = exports.get_blockchain_state = exports.get_block_records = exports.get_block_record_by_height = exports.get_block_record = exports.get_block = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_additions_and_removals = exports.chia_full_node_service = exports.get_pool_state = exports.set_pool_payout_instructions = exports.get_harvesters = exports.set_reward_targets = exports.get_signage_points = exports.get_signage_point = exports.get_reward_targets = exports.chia_farmer_service = void 0;
4
+ exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.chia_common_service = exports.get_peer_counts = exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.take_offer = exports.send_transaction_multi = exports.send_transaction = exports.send_clawback_transaction = exports.rl_set_user_info = exports.pw_status = exports.pw_absorb_rewards = exports.pw_self_pool = exports.pw_join_pool = exports.push_tx_wallet = exports.log_in = exports.get_wallets = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction_count = exports.get_transaction = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = exports.get_next_address = exports.get_network_info_of_wallet = exports.get_offer_summary = exports.get_offers_count = exports.get_offer = exports.get_logged_in_fingerprint = exports.get_initial_freeze_period_of_wallet = exports.get_height_info = exports.get_farmed_amount = exports.get_cat_list = exports.get_all_offers = exports.generate_mnemonic = exports.farm_block = exports.did_update_recovery_ids = exports.did_spend = exports.did_recovery_spend = exports.did_get_recovery_list = exports.did_get_pubkey = exports.did_get_information_needed_for_recovery = exports.did_get_did = exports.did_create_backup_file = exports.did_create_attest = exports.delete_key = void 0;
5
+ exports.get_routes = void 0;
5
6
  var index_1 = require("./farmer/index");
6
7
  Object.defineProperty(exports, "chia_farmer_service", { enumerable: true, get: function () { return index_1.chia_farmer_service; } });
7
8
  Object.defineProperty(exports, "get_reward_targets", { enumerable: true, get: function () { return index_1.get_reward_targets; } });
@@ -22,6 +23,7 @@ Object.defineProperty(exports, "get_block_record_by_height", { enumerable: true,
22
23
  Object.defineProperty(exports, "get_block_records", { enumerable: true, get: function () { return index_2.get_block_records; } });
23
24
  Object.defineProperty(exports, "get_blockchain_state", { enumerable: true, get: function () { return index_2.get_blockchain_state; } });
24
25
  Object.defineProperty(exports, "get_blocks", { enumerable: true, get: function () { return index_2.get_blocks; } });
26
+ Object.defineProperty(exports, "get_block_count_metrics", { enumerable: true, get: function () { return index_2.get_block_count_metrics; } });
25
27
  Object.defineProperty(exports, "get_recent_signage_point_or_eos", { enumerable: true, get: function () { return index_2.get_recent_signage_point_or_eos; } });
26
28
  Object.defineProperty(exports, "get_coin_record_by_name", { enumerable: true, get: function () { return index_2.get_coin_record_by_name; } });
27
29
  Object.defineProperty(exports, "get_coin_records_by_puzzle_hash", { enumerable: true, get: function () { return index_2.get_coin_records_by_puzzle_hash; } });
@@ -44,12 +46,13 @@ var index_4 = require("./wallet/index");
44
46
  Object.defineProperty(exports, "chia_wallet_service", { enumerable: true, get: function () { return index_4.chia_wallet_service; } });
45
47
  Object.defineProperty(exports, "add_key", { enumerable: true, get: function () { return index_4.add_key; } });
46
48
  Object.defineProperty(exports, "add_rate_limited_funds", { enumerable: true, get: function () { return index_4.add_rate_limited_funds; } });
47
- Object.defineProperty(exports, "cancel_trade", { enumerable: true, get: function () { return index_4.cancel_trade; } });
48
- Object.defineProperty(exports, "cc_get_colour", { enumerable: true, get: function () { return index_4.cc_get_colour; } });
49
- Object.defineProperty(exports, "cc_get_name", { enumerable: true, get: function () { return index_4.cc_get_name; } });
50
- Object.defineProperty(exports, "cc_set_name", { enumerable: true, get: function () { return index_4.cc_set_name; } });
51
- Object.defineProperty(exports, "cc_spend", { enumerable: true, get: function () { return index_4.cc_spend; } });
52
- Object.defineProperty(exports, "create_backup", { enumerable: true, get: function () { return index_4.create_backup; } });
49
+ Object.defineProperty(exports, "cancel_offer", { enumerable: true, get: function () { return index_4.cancel_offer; } });
50
+ Object.defineProperty(exports, "cat_get_asset_id", { enumerable: true, get: function () { return index_4.cat_get_asset_id; } });
51
+ Object.defineProperty(exports, "cat_get_name", { enumerable: true, get: function () { return index_4.cat_get_name; } });
52
+ Object.defineProperty(exports, "cat_asset_id_to_name", { enumerable: true, get: function () { return index_4.cat_asset_id_to_name; } });
53
+ Object.defineProperty(exports, "cat_set_name", { enumerable: true, get: function () { return index_4.cat_set_name; } });
54
+ Object.defineProperty(exports, "cat_spend", { enumerable: true, get: function () { return index_4.cat_spend; } });
55
+ Object.defineProperty(exports, "check_offer_validity", { enumerable: true, get: function () { return index_4.check_offer_validity; } });
53
56
  Object.defineProperty(exports, "create_new_wallet", { enumerable: true, get: function () { return index_4.create_new_wallet; } });
54
57
  Object.defineProperty(exports, "create_offer_for_ids", { enumerable: true, get: function () { return index_4.create_offer_for_ids; } });
55
58
  Object.defineProperty(exports, "create_signed_transaction", { enumerable: true, get: function () { return index_4.create_signed_transaction; } });
@@ -66,29 +69,44 @@ Object.defineProperty(exports, "did_spend", { enumerable: true, get: function ()
66
69
  Object.defineProperty(exports, "did_update_recovery_ids", { enumerable: true, get: function () { return index_4.did_update_recovery_ids; } });
67
70
  Object.defineProperty(exports, "farm_block", { enumerable: true, get: function () { return index_4.farm_block; } });
68
71
  Object.defineProperty(exports, "generate_mnemonic", { enumerable: true, get: function () { return index_4.generate_mnemonic; } });
69
- Object.defineProperty(exports, "get_all_trades", { enumerable: true, get: function () { return index_4.get_all_trades; } });
70
- Object.defineProperty(exports, "get_discrepancies_for_offer", { enumerable: true, get: function () { return index_4.get_discrepancies_for_offer; } });
72
+ Object.defineProperty(exports, "get_all_offers", { enumerable: true, get: function () { return index_4.get_all_offers; } });
73
+ Object.defineProperty(exports, "get_cat_list", { enumerable: true, get: function () { return index_4.get_cat_list; } });
71
74
  Object.defineProperty(exports, "get_farmed_amount", { enumerable: true, get: function () { return index_4.get_farmed_amount; } });
72
75
  Object.defineProperty(exports, "get_height_info", { enumerable: true, get: function () { return index_4.get_height_info; } });
73
76
  Object.defineProperty(exports, "get_initial_freeze_period_of_wallet", { enumerable: true, get: function () { return index_4.get_initial_freeze_period_of_wallet; } });
77
+ Object.defineProperty(exports, "get_logged_in_fingerprint", { enumerable: true, get: function () { return index_4.get_logged_in_fingerprint; } });
78
+ Object.defineProperty(exports, "get_offer", { enumerable: true, get: function () { return index_4.get_offer; } });
79
+ Object.defineProperty(exports, "get_offers_count", { enumerable: true, get: function () { return index_4.get_offers_count; } });
80
+ Object.defineProperty(exports, "get_offer_summary", { enumerable: true, get: function () { return index_4.get_offer_summary; } });
74
81
  Object.defineProperty(exports, "get_network_info_of_wallet", { enumerable: true, get: function () { return index_4.get_network_info_of_wallet; } });
75
82
  Object.defineProperty(exports, "get_next_address", { enumerable: true, get: function () { return index_4.get_next_address; } });
76
83
  Object.defineProperty(exports, "get_private_key", { enumerable: true, get: function () { return index_4.get_private_key; } });
77
84
  Object.defineProperty(exports, "get_public_keys", { enumerable: true, get: function () { return index_4.get_public_keys; } });
78
85
  Object.defineProperty(exports, "get_sync_status", { enumerable: true, get: function () { return index_4.get_sync_status; } });
79
- Object.defineProperty(exports, "get_trade", { enumerable: true, get: function () { return index_4.get_trade; } });
80
86
  Object.defineProperty(exports, "get_transaction", { enumerable: true, get: function () { return index_4.get_transaction; } });
81
87
  Object.defineProperty(exports, "get_transaction_count", { enumerable: true, get: function () { return index_4.get_transaction_count; } });
82
88
  Object.defineProperty(exports, "get_transactions", { enumerable: true, get: function () { return index_4.get_transactions; } });
83
89
  Object.defineProperty(exports, "get_wallet_balance", { enumerable: true, get: function () { return index_4.get_wallet_balance; } });
84
90
  Object.defineProperty(exports, "get_wallets", { enumerable: true, get: function () { return index_4.get_wallets; } });
85
91
  Object.defineProperty(exports, "log_in", { enumerable: true, get: function () { return index_4.log_in; } });
92
+ Object.defineProperty(exports, "push_tx_wallet", { enumerable: true, get: function () { return index_4.push_tx; } });
86
93
  Object.defineProperty(exports, "pw_join_pool", { enumerable: true, get: function () { return index_4.pw_join_pool; } });
87
94
  Object.defineProperty(exports, "pw_self_pool", { enumerable: true, get: function () { return index_4.pw_self_pool; } });
88
95
  Object.defineProperty(exports, "pw_absorb_rewards", { enumerable: true, get: function () { return index_4.pw_absorb_rewards; } });
89
96
  Object.defineProperty(exports, "pw_status", { enumerable: true, get: function () { return index_4.pw_status; } });
90
- Object.defineProperty(exports, "respond_to_offer", { enumerable: true, get: function () { return index_4.respond_to_offer; } });
91
97
  Object.defineProperty(exports, "rl_set_user_info", { enumerable: true, get: function () { return index_4.rl_set_user_info; } });
92
98
  Object.defineProperty(exports, "send_clawback_transaction", { enumerable: true, get: function () { return index_4.send_clawback_transaction; } });
93
99
  Object.defineProperty(exports, "send_transaction", { enumerable: true, get: function () { return index_4.send_transaction; } });
94
100
  Object.defineProperty(exports, "send_transaction_multi", { enumerable: true, get: function () { return index_4.send_transaction_multi; } });
101
+ Object.defineProperty(exports, "take_offer", { enumerable: true, get: function () { return index_4.take_offer; } });
102
+ var index_5 = require("./crawler/index");
103
+ Object.defineProperty(exports, "chia_crawler_service", { enumerable: true, get: function () { return index_5.chia_crawler_service; } });
104
+ Object.defineProperty(exports, "get_ips_after_timestamp", { enumerable: true, get: function () { return index_5.get_ips_after_timestamp; } });
105
+ Object.defineProperty(exports, "get_peer_counts", { enumerable: true, get: function () { return index_5.get_peer_counts; } });
106
+ var index_6 = require("./common/index");
107
+ Object.defineProperty(exports, "chia_common_service", { enumerable: true, get: function () { return index_6.chia_common_service; } });
108
+ Object.defineProperty(exports, "get_connections", { enumerable: true, get: function () { return index_6.get_connections; } });
109
+ Object.defineProperty(exports, "open_connection", { enumerable: true, get: function () { return index_6.open_connection; } });
110
+ Object.defineProperty(exports, "close_connection", { enumerable: true, get: function () { return index_6.close_connection; } });
111
+ Object.defineProperty(exports, "stop_node", { enumerable: true, get: function () { return index_6.stop_node; } });
112
+ Object.defineProperty(exports, "get_routes", { enumerable: true, get: function () { return index_6.get_routes; } });
@@ -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 { TradeRecordInJson } from "../../chia/wallet/util/trade_utils";
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: "not_initialized" | "Unknown 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 TCreate_New_CC_WalletRequest = {
163
- host: str;
160
+ export declare type TCreate_New_CAT_WalletRequest = {
164
161
  fee?: uint64;
165
- wallet_type: "cc_wallet";
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: "cc_wallet";
167
+ wallet_type: "cat_wallet";
172
168
  mode: "existing";
173
- colour: str;
169
+ asset_id: str;
174
170
  };
175
- export declare type TCreate_New_CC_WalletResponse = {
171
+ export declare type TCreate_New_CAT_WalletResponse = {
176
172
  type: uint8;
177
- colour: str;
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 = TCreate_New_CC_WalletRequest | TCreate_New_RL_WalletRequest | TCreate_New_DID_WalletRequest | TCreate_New_Pool_WalletRequest;
270
- export declare type TCreateNewWalletResponse = TCreate_New_CC_WalletResponse | TCreate_New_RL_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_Pool_WalletResponse;
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: TransactionRecord;
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: Array<TransactionRecord & {
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?: int;
320
+ fee: int;
331
321
  address: str;
322
+ memos?: str[];
332
323
  };
333
324
  export declare type TSendTransactionResponse = {
334
- transaction: TransactionRecord;
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: TransactionRecord;
348
- transaction_id: TransactionRecord["name"];
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: TransactionRecord;
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 cc_set_name_command = "cc_set_name";
402
- export declare type cc_set_name_command = typeof cc_set_name_command;
403
- export declare type TCcSetNameRequest = {
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 TCcSetNameResponse = {
406
+ export declare type TCatSetNameResponse = {
408
407
  wallet_id: int;
409
408
  };
410
- export declare function cc_set_name(agent: TRPCAgent, data: TCcSetNameRequest): Promise<TCcSetNameResponse>;
411
- export declare const cc_get_name_command = "cc_get_name";
412
- export declare type cc_get_name_command = typeof cc_get_name_command;
413
- export declare type TCcGetNameRequest = {
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 TCcGetNameResponse = {
425
+ export declare type TCatGetNameResponse = {
417
426
  wallet_id: int;
418
427
  name: str;
419
428
  };
420
- export declare function cc_get_name(agent: TRPCAgent, data: TCcGetNameRequest): Promise<TCcGetNameResponse>;
421
- export declare const cc_spend_command = "cc_spend";
422
- export declare type cc_spend_command = typeof cc_spend_command;
423
- export declare type TCcSpendRequest = {
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
- amount: int;
427
- fee?: uint64;
435
+ memos?: str[];
436
+ amount: uint64;
437
+ fee: uint64;
428
438
  };
429
- export declare type TCcSpendResponse = {
430
- transaction: TransactionRecord;
439
+ export declare type TCatSpendResponse = {
440
+ transaction: TransactionRecordConvenience;
431
441
  transaction_id: TransactionRecord["name"];
432
442
  };
433
- export declare function cc_spend(agent: TRPCAgent, data: TCcSpendRequest): Promise<TCcSpendResponse>;
434
- export declare const cc_get_colour_command = "cc_get_colour";
435
- export declare type cc_get_colour_command = typeof cc_get_colour_command;
436
- export declare type TCcGetColourRequest = {
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 TCcGetColourResponse = {
440
- colour: str;
449
+ export declare type TCatGetAssetIdResponse = {
450
+ asset_id: str;
441
451
  wallet_id: int;
442
452
  };
443
- export declare function cc_get_colour(agent: TRPCAgent, data: TCcGetColourRequest): Promise<TCcGetColourResponse>;
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
- ids: Record<int, int>;
448
- filename: str;
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 get_discrepancies_for_offer_command = "get_discrepancies_for_offer";
453
- export declare type get_discrepancies_for_offer_command = typeof get_discrepancies_for_offer_command;
454
- export declare type TGetDiscrepanciesForOfferRequest = {
455
- filename: str;
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 type TGetDiscrepanciesForOfferResponse = {
458
- discrepancies: Optional<Record<str, int>>;
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 function get_discrepancies_for_offer(agent: TRPCAgent, data: TGetDiscrepanciesForOfferRequest): Promise<TGetDiscrepanciesForOfferResponse>;
461
- export declare const respond_to_offer_command = "respond_to_offer";
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 type TResponseToOfferResponse = {};
467
- export declare function respond_to_offer(agent: TRPCAgent, data: TResponseToOfferRequest): Promise<TResponseToOfferResponse>;
468
- export declare const get_trade_command = "get_trade";
469
- export declare type get_trade_command = typeof get_trade_command;
470
- export declare type TGetTradeRequest = {
471
- trade_id: str;
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 type TGetTradeResponse = {
474
- trade: TradeRecordInJson;
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 function get_trade(agent: TRPCAgent, data: TGetTradeRequest): Promise<TGetTradeResponse>;
477
- export declare const get_all_trades_command = "get_all_trades";
478
- export declare type get_all_trades_command = typeof get_all_trades_command;
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 get_all_trades(agent: TRPCAgent): Promise<TGetAllTradesResponse>;
484
- export declare const cancel_trade_command = "cancel_trade";
485
- export declare type cancel_trade_command = typeof cancel_trade_command;
486
- export declare type TCancelTradeRequest = {
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 type TCancelTradeResponse = {};
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";