chia-agent 9.1.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +189 -0
- package/README.md +12 -5
- package/api/chia/data_layer/data_layer_util.d.ts +8 -1
- package/api/chia/types/_python_types_.d.ts +1 -0
- package/api/chia/types/clvm_cost.d.ts +2 -0
- package/api/chia/types/clvm_cost.js +2 -0
- package/api/chia/types/mempool_item.d.ts +2 -4
- package/api/chia/util/keychain.d.ts +12 -0
- package/api/chia/util/keychain.js +2 -0
- package/api/chia/wallet/nft_wallet/nft_info.d.ts +3 -0
- package/api/chia/wallet/util/wallet_types.d.ts +0 -1
- package/api/chia/wallet/util/wallet_types.js +1 -1
- package/api/rpc/common/index.d.ts +19 -9
- package/api/rpc/crawler/index.d.ts +8 -2
- package/api/rpc/data_layer/index.d.ts +69 -27
- package/api/rpc/data_layer/index.js +8 -1
- package/api/rpc/farmer/index.d.ts +30 -13
- package/api/rpc/full_node/index.d.ts +76 -25
- package/api/rpc/full_node/index.js +8 -1
- package/api/rpc/harvester/index.d.ts +16 -6
- package/api/rpc/index.d.ts +11 -18
- package/api/rpc/index.js +14 -4
- package/api/rpc/wallet/index.d.ts +475 -95
- package/api/rpc/wallet/index.js +110 -4
- package/api/types.d.ts +3 -0
- package/api/ws/chia_plots_create/index.d.ts +4 -2
- package/api/ws/crawler/index.d.ts +5 -2
- package/api/ws/daemon/index.d.ts +165 -33
- package/api/ws/daemon/index.js +37 -2
- package/api/ws/farmer/index.d.ts +16 -8
- package/api/ws/full_node/index.d.ts +10 -5
- package/api/ws/harvester/index.d.ts +7 -3
- package/api/ws/index.d.ts +9 -18
- package/api/ws/index.js +15 -12
- package/api/ws/timelord/index.d.ts +9 -4
- package/api/ws/wallet/index.d.ts +11 -6
- package/daemon/index.d.ts +6 -7
- package/package.json +1 -1
- package/rpc/index.d.ts +1 -2
package/api/rpc/wallet/index.js
CHANGED
|
@@ -9,10 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
12
|
+
exports.get_transaction_count_command = exports.send_transaction_multi = exports.send_transaction_multi_command = exports.send_transaction = exports.send_transaction_command = exports.get_next_address = exports.get_next_address_command = exports.get_transactions = exports.get_transactions_command = exports.get_transaction = exports.get_transaction_command = exports.get_wallet_balance = exports.get_wallet_balance_command = exports.create_new_wallet = exports.create_new_wallet_command = exports.get_wallets = exports.get_wallets_command = exports.get_network_info_of_wallet = exports.get_network_info_command_of_wallet = exports.get_initial_freeze_period_of_wallet = exports.get_initial_freeze_period_command_of_wallet = exports.farm_block = exports.farm_block_command = exports.push_transactions = exports.push_transactions_command = exports.push_tx = exports.push_tx_command = exports.get_height_info = exports.get_height_info_command = exports.get_sync_status = exports.get_sync_status_command = exports.delete_all_keys = exports.delete_all_keys_command = exports.check_delete_key = exports.check_delete_key_command = exports.delete_key = exports.delete_key_command = exports.add_key = exports.add_key_command = exports.generate_mnemonic = exports.generate_mnemonic_command = exports.get_private_key = exports.get_private_key_command = exports.get_public_keys = exports.get_public_keys_command = exports.get_logged_in_fingerprint = exports.get_logged_in_fingerprint_command = exports.log_in = exports.log_in_command = exports.chia_wallet_service = void 0;
|
|
13
|
+
exports.take_offer_command = exports.check_offer_validity = exports.check_offer_validity_command = exports.get_offer_summary = exports.get_offer_summary_command = exports.create_offer_for_ids = exports.create_offer_for_ids_command = exports.cat_get_asset_id = exports.cat_get_asset_id_command = exports.cat_spend = exports.cat_spend_command = exports.get_stray_cats = exports.get_stray_cats_command = exports.cat_get_name = exports.cat_get_name_command = exports.cat_asset_id_to_name = exports.cat_asset_id_to_name_command = exports.cat_set_name = exports.cat_set_name_command = exports.get_cat_list = exports.get_cat_list_command = exports.sign_message_by_id = exports.sign_message_by_id_command = exports.sign_message_by_address = exports.sign_message_by_address_command = exports.verify_signature = exports.verify_signature_command = exports.send_notification = exports.send_notification_command = exports.delete_notifications = exports.delete_notifications_command = exports.get_notifications = exports.get_notifications_command = exports.extend_derivation_index = exports.extend_derivation_index_command = exports.get_current_derivation_index = exports.get_current_derivation_index_command = exports.get_coin_records_by_names = exports.get_coin_records_by_names_command = exports.get_spendable_coins = exports.get_spendable_coins_command = exports.select_coins = exports.select_coins_command = exports.delete_unconfirmed_transactions = exports.delete_unconfirmed_transactions_command = exports.create_signed_transaction = exports.create_signed_transaction_command = exports.get_farmed_amount = exports.get_farmed_amount_command = exports.get_transaction_count = void 0;
|
|
14
|
+
exports.nft_get_nfts_command = exports.nft_mint_nft = exports.nft_mint_nft_command = exports.did_transfer_did = exports.did_transfer_did_command = exports.did_find_lost_did = exports.did_find_lost_did_command = exports.did_get_info = exports.did_get_info_command = exports.did_message_spend = exports.did_message_spend_command = exports.did_create_backup_file = exports.did_create_backup_file_command = exports.did_get_current_coin_info = exports.did_get_current_coin_info_command = exports.did_get_information_needed_for_recovery = exports.did_get_information_needed_for_recovery_command = exports.did_create_attest = exports.did_create_attest_command = exports.did_get_metadata = exports.did_get_metadata_command = exports.did_get_recovery_list = exports.did_get_recovery_list_command = exports.did_recovery_spend = exports.did_recovery_spend_command = exports.did_get_did = exports.did_get_did_command = exports.did_get_pubkey = exports.did_get_pubkey_command = exports.did_spend = exports.did_spend_command = exports.did_update_metadata = exports.did_update_metadata_command = exports.did_update_recovery_ids = exports.did_update_recovery_ids_command = exports.did_get_wallet_name = exports.did_get_wallet_name_command = exports.did_set_wallet_name = exports.did_set_wallet_name_command = exports.cancel_offers = exports.cancel_offers_command = exports.cancel_offer = exports.cancel_offer_command = exports.get_offers_count = exports.get_offers_count_command = exports.get_all_offers = exports.get_all_offers_command = exports.get_offer = exports.get_offer_command = exports.take_offer = void 0;
|
|
15
|
+
exports.dl_update_multiple_command = exports.dl_update_root = exports.dl_update_root_command = exports.dl_singletons_by_root = exports.dl_singletons_by_root_command = exports.dl_latest_singleton = exports.dl_latest_singleton_command = exports.dl_stop_tracking = exports.dl_stop_tracking_command = exports.dl_track_new = exports.dl_track_new_command = exports.create_new_dl = exports.create_new_dl_command = exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = exports.pw_self_pool_command = exports.pw_join_pool = exports.pw_join_pool_command = exports.add_rate_limited_funds = exports.add_rate_limited_funds_command = exports.send_clawback_transaction = exports.send_clawback_transaction_command = exports.rl_set_user_info = exports.rl_set_user_info_command = exports.nft_mint_bulk = exports.nft_mint_bulk_command = exports.nft_calculate_royalties = exports.nft_calculate_royalties_command = exports.nft_add_uri = exports.nft_add_uri_command = exports.nft_get_info = exports.nft_get_info_command = exports.nft_transfer_nft = exports.nft_transfer_nft_command = exports.nft_set_nft_status = exports.nft_set_nft_status_command = exports.nft_get_wallets_with_dids = exports.nft_get_wallets_with_dids_command = exports.nft_get_wallet_did = exports.nft_get_wallet_did_command = exports.nft_get_by_did = exports.nft_get_by_did_command = exports.nft_set_did_bulk = exports.nft_set_did_bulk_command = exports.nft_set_nft_did = exports.nft_set_nft_did_command = exports.nft_get_nfts = void 0;
|
|
16
|
+
exports.dl_delete_mirror = exports.dl_delete_mirror_command = exports.dl_new_mirror = exports.dl_new_mirror_command = exports.dl_get_mirrors = exports.dl_get_mirrors_command = exports.dl_owned_singletons = exports.dl_owned_singletons_command = exports.dl_history = exports.dl_history_command = exports.dl_update_multiple = void 0;
|
|
16
17
|
exports.chia_wallet_service = "chia_wallet";
|
|
17
18
|
// # Key management
|
|
18
19
|
exports.log_in_command = "log_in";
|
|
@@ -100,6 +101,13 @@ function push_tx(agent, data) {
|
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
exports.push_tx = push_tx;
|
|
104
|
+
exports.push_transactions_command = "push_transactions";
|
|
105
|
+
function push_transactions(agent, data) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.push_transactions_command, data);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
exports.push_transactions = push_transactions;
|
|
103
111
|
exports.farm_block_command = "farm_block";
|
|
104
112
|
function farm_block(agent, data) {
|
|
105
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -214,6 +222,20 @@ function select_coins(agent, data) {
|
|
|
214
222
|
});
|
|
215
223
|
}
|
|
216
224
|
exports.select_coins = select_coins;
|
|
225
|
+
exports.get_spendable_coins_command = "get_spendable_coins";
|
|
226
|
+
function get_spendable_coins(agent, data) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_spendable_coins_command, data);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
exports.get_spendable_coins = get_spendable_coins;
|
|
232
|
+
exports.get_coin_records_by_names_command = "get_coin_records_by_names";
|
|
233
|
+
function get_coin_records_by_names(agent, data) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_coin_records_by_names_command, data);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
exports.get_coin_records_by_names = get_coin_records_by_names;
|
|
217
239
|
exports.get_current_derivation_index_command = "get_current_derivation_index";
|
|
218
240
|
function get_current_derivation_index(agent) {
|
|
219
241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -228,6 +250,48 @@ function extend_derivation_index(agent, data) {
|
|
|
228
250
|
});
|
|
229
251
|
}
|
|
230
252
|
exports.extend_derivation_index = extend_derivation_index;
|
|
253
|
+
exports.get_notifications_command = "get_notifications";
|
|
254
|
+
function get_notifications(agent, data) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.get_notifications_command, data);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
exports.get_notifications = get_notifications;
|
|
260
|
+
exports.delete_notifications_command = "delete_notifications";
|
|
261
|
+
function delete_notifications(agent, data) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.delete_notifications_command, data);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
exports.delete_notifications = delete_notifications;
|
|
267
|
+
exports.send_notification_command = "send_notification";
|
|
268
|
+
function send_notification(agent, data) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.send_notification_command, data);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
exports.send_notification = send_notification;
|
|
274
|
+
exports.verify_signature_command = "verify_signature";
|
|
275
|
+
function verify_signature(agent, data) {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.verify_signature_command, data);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
exports.verify_signature = verify_signature;
|
|
281
|
+
exports.sign_message_by_address_command = "sign_message_by_address";
|
|
282
|
+
function sign_message_by_address(agent, data) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.sign_message_by_address_command, data);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
exports.sign_message_by_address = sign_message_by_address;
|
|
288
|
+
exports.sign_message_by_id_command = "sign_message_by_id";
|
|
289
|
+
function sign_message_by_id(agent, data) {
|
|
290
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.sign_message_by_id_command, data);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
exports.sign_message_by_id = sign_message_by_id;
|
|
231
295
|
// # CATs and Trading
|
|
232
296
|
exports.get_cat_list_command = "get_cat_list";
|
|
233
297
|
function get_cat_list(agent) {
|
|
@@ -441,6 +505,27 @@ function did_create_backup_file(agent, data) {
|
|
|
441
505
|
});
|
|
442
506
|
}
|
|
443
507
|
exports.did_create_backup_file = did_create_backup_file;
|
|
508
|
+
exports.did_message_spend_command = "did_message_spend";
|
|
509
|
+
function did_message_spend(agent, data) {
|
|
510
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
511
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.did_message_spend_command, data);
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
exports.did_message_spend = did_message_spend;
|
|
515
|
+
exports.did_get_info_command = "did_get_info";
|
|
516
|
+
function did_get_info(agent, data) {
|
|
517
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
518
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.did_get_info_command, data);
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
exports.did_get_info = did_get_info;
|
|
522
|
+
exports.did_find_lost_did_command = "did_find_lost_did";
|
|
523
|
+
function did_find_lost_did(agent, data) {
|
|
524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.did_find_lost_did_command, data);
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
exports.did_find_lost_did = did_find_lost_did;
|
|
444
529
|
exports.did_transfer_did_command = "did_transfer_did";
|
|
445
530
|
function did_transfer_did(agent, data) {
|
|
446
531
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -470,6 +555,13 @@ function nft_set_nft_did(agent, data) {
|
|
|
470
555
|
});
|
|
471
556
|
}
|
|
472
557
|
exports.nft_set_nft_did = nft_set_nft_did;
|
|
558
|
+
exports.nft_set_did_bulk_command = "nft_set_did_bulk";
|
|
559
|
+
function nft_set_did_bulk(agent, data) {
|
|
560
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
561
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.nft_set_did_bulk_command, data);
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
exports.nft_set_did_bulk = nft_set_did_bulk;
|
|
473
565
|
exports.nft_get_by_did_command = "nft_get_by_did";
|
|
474
566
|
function nft_get_by_did(agent, data) {
|
|
475
567
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -519,6 +611,20 @@ function nft_add_uri(agent, data) {
|
|
|
519
611
|
});
|
|
520
612
|
}
|
|
521
613
|
exports.nft_add_uri = nft_add_uri;
|
|
614
|
+
exports.nft_calculate_royalties_command = "nft_calculate_royalties";
|
|
615
|
+
function nft_calculate_royalties(agent, data) {
|
|
616
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
617
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.nft_calculate_royalties_command, data);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
exports.nft_calculate_royalties = nft_calculate_royalties;
|
|
621
|
+
exports.nft_mint_bulk_command = "nft_mint_bulk";
|
|
622
|
+
function nft_mint_bulk(agent, data) {
|
|
623
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
624
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.nft_mint_bulk_command, data);
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
exports.nft_mint_bulk = nft_mint_bulk;
|
|
522
628
|
// # RL wallet
|
|
523
629
|
exports.rl_set_user_info_command = "rl_set_user_info";
|
|
524
630
|
function rl_set_user_info(agent, data) {
|
package/api/types.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NodeType } from "./chia/server/outbound_message";
|
|
2
2
|
import { float, int, str, uint16 } from "./chia/types/_python_types_";
|
|
3
3
|
import { bytes32 } from "./chia/types/blockchain_format/sized_bytes";
|
|
4
|
+
import { TRPCAgent } from "../rpc/index";
|
|
5
|
+
import { TDaemon } from "../daemon/index";
|
|
4
6
|
export declare type GetMessageType<O extends string, C extends string, D> = {
|
|
5
7
|
origin: O;
|
|
6
8
|
command: C;
|
|
@@ -9,6 +11,7 @@ export declare type GetMessageType<O extends string, C extends string, D> = {
|
|
|
9
11
|
request_id: string;
|
|
10
12
|
destination: string;
|
|
11
13
|
};
|
|
14
|
+
export declare type ResType<T extends TRPCAgent | TDaemon, A, D> = T extends TRPCAgent ? A : D;
|
|
12
15
|
export declare const wallet_ui_service = "wallet_ui";
|
|
13
16
|
export declare const metrics_service = "metrics";
|
|
14
17
|
export declare type TConnectionGeneral = {
|
|
@@ -9,7 +9,9 @@ export declare type TStateChangedBroadCastOfPlots = {
|
|
|
9
9
|
state: "log_changed" | "state_changed";
|
|
10
10
|
queue: TPlotQueue[];
|
|
11
11
|
};
|
|
12
|
-
export declare
|
|
12
|
+
export declare type WsStateChangedPlotsMessage = GetMessageType<chia_plotter_service, state_changed_command_of_plots, TStateChangedBroadCastOfPlots>;
|
|
13
|
+
export declare function on_state_changed_of_plots(daemon: TDaemon, callback: (e: WsStateChangedPlotsMessage) => unknown): Promise<() => void>;
|
|
14
|
+
export declare type WsPlotsMessage = WsStateChangedPlotsMessage;
|
|
13
15
|
export declare type chia_plots_create_commands = state_changed_command_of_plots;
|
|
14
16
|
export declare type TChiaPlotsCreateBroadcast = TStateChangedBroadCastOfPlots;
|
|
15
|
-
export declare function on_message_from_chia_plots_create(daemon: TDaemon, callback: (e:
|
|
17
|
+
export declare function on_message_from_chia_plots_create(daemon: TDaemon, callback: (e: WsPlotsMessage) => unknown): Promise<() => void>;
|
|
@@ -16,10 +16,13 @@ export declare type loaded_initial_peers_command = typeof loaded_initial_peers_c
|
|
|
16
16
|
export declare type TLoadedInitialPeersBroadCast = {
|
|
17
17
|
peer_counts: TPeerCounts;
|
|
18
18
|
};
|
|
19
|
-
export declare
|
|
19
|
+
export declare type WsLoadedInitialPeersMessage = GetMessageType<chia_crawler_service, loaded_initial_peers_command, TLoadedInitialPeersBroadCast>;
|
|
20
|
+
export declare function on_loaded_initial_peers(daemon: TDaemon, callback: (e: WsLoadedInitialPeersMessage) => unknown): Promise<() => void>;
|
|
20
21
|
export declare const crawl_batch_completed_command = "crawl_batch_completed";
|
|
21
22
|
export declare type crawl_batch_completed_command = typeof crawl_batch_completed_command;
|
|
22
23
|
export declare type TCrawlBatchCompletedBroadCast = {
|
|
23
24
|
peer_counts: TPeerCounts;
|
|
24
25
|
};
|
|
25
|
-
export declare
|
|
26
|
+
export declare type WsCrawlBatchCompletedMessage = GetMessageType<chia_crawler_service, crawl_batch_completed_command, TCrawlBatchCompletedBroadCast>;
|
|
27
|
+
export declare function on_crawl_batch_completed(daemon: TDaemon, callback: (e: WsCrawlBatchCompletedMessage) => unknown): Promise<() => void>;
|
|
28
|
+
export declare type WsCrawlerMessage = WsLoadedInitialPeersMessage | WsCrawlBatchCompletedMessage;
|