-
Notifications
You must be signed in to change notification settings - Fork 267
Expand file tree
/
Copy pathisAllowedCommand.ts
More file actions
145 lines (134 loc) · 4.56 KB
/
Copy pathisAllowedCommand.ts
File metadata and controls
145 lines (134 loc) · 4.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import { Commands } from './Commands';
// list of chia commands that are allowed to used by renderer process without confirmation via websocket - not dapp commands
const ALLOWED_COMMANDS_SET = new Set<keyof typeof Commands>([
'daemon.register_service',
'daemon.keyring_status',
'daemon.get_version',
'daemon.start_service',
'daemon.stop_service',
'daemon.set_label',
'daemon.delete_label',
'daemon.is_running',
'daemon.get_keys',
'daemon.get_key',
'daemon.get_public_key',
'daemon.get_wallet_addresses',
'daemon.running_services',
'daemon.get_plotters',
'daemon.get_keys_for_plotting',
'daemon.exit',
'daemon.add_private_key',
'daemon.unlock_keyring',
'daemon.start_plotting',
'chia_wallet.ping',
'chia_full_node.ping',
'chia_farmer.ping',
'chia_harvester.ping',
'chia_data_layer.ping',
'chia_wallet.get_offer_summary',
'chia_wallet.get_network_info',
'chia_wallet.get_logged_in_fingerprint',
'chia_wallet.get_notifications',
'chia_wallet.get_sync_status',
'chia_wallet.get_full_node_peer_count',
'chia_wallet.get_fee_estimate',
'chia_wallet.get_wallets',
'chia_wallet.get_coin_records_by_names',
'chia_wallet.select_coins',
'chia_wallet.get_spendable_coins',
'chia_wallet.nft_get_wallet_did',
'chia_wallet.cat_get_asset_id',
'chia_wallet.cat_get_name',
'chia_wallet.cat_asset_id_to_name',
'chia_wallet.get_next_address',
'chia_wallet.get_cat_list',
'chia_wallet.get_stray_cats',
'chia_wallet.get_transaction_count',
'chia_wallet.get_transactions',
'chia_wallet.get_transaction',
'chia_wallet.get_wallet_balance',
'chia_wallet.get_wallet_balances',
'chia_wallet.get_current_derivation_index',
'chia_wallet.get_auto_claim',
'chia_wallet.nft_count_nfts',
'chia_wallet.nft_get_nfts',
'chia_wallet.nft_get_wallets_with_dids',
'chia_wallet.vc_get_list',
'chia_wallet.get_timestamp_for_height',
'chia_wallet.vc_get',
'chia_wallet.get_offers_count',
'chia_wallet.get_all_offers',
'chia_wallet.get_height_info',
'chia_wallet.get_puzzle_and_solution',
'chia_wallet.get_connections',
'chia_wallet.log_in',
'chia_wallet.generate_mnemonic',
'chia_wallet.check_delete_key',
'chia_wallet.cat_set_name',
'chia_wallet.verify_signature',
'chia_wallet.set_wallet_resync_on_startup',
'chia_wallet.delete_unconfirmed_transactions',
'chia_wallet.extend_derivation_index',
'chia_wallet.nft_get_info',
'chia_wallet.get_farmed_amount',
'chia_wallet.get_offer',
'chia_wallet.nft_calculate_royalties',
'chia_wallet.check_offer_validity',
'chia_wallet.get_transaction_memo',
'chia_wallet.pw_status',
'chia_wallet.did_get_did',
'chia_wallet.did_get_wallet_name',
'chia_wallet.did_set_wallet_name',
'chia_wallet.did_get_info',
'chia_wallet.did_find_lost_did',
'chia_wallet.did_get_current_coin_info',
'chia_wallet.did_get_information_needed_for_recovery',
'chia_wallet.did_get_metadata',
'chia_wallet.did_get_pubkey',
'chia_wallet.did_get_recovery_list',
'chia_wallet.vc_add_proofs',
'chia_wallet.vc_get_proofs_for_root',
'chia_full_node.get_unfinished_block_headers',
'chia_full_node.get_connections',
'chia_full_node.get_block_records',
'chia_full_node.get_block',
'chia_full_node.get_block_record',
'chia_full_node.get_blockchain_state',
'chia_full_node.get_fee_estimate',
'chia_farmer.get_harvesters_summary',
'chia_farmer.get_connections',
'chia_farmer.get_signage_points',
'chia_farmer.get_pool_state',
'chia_farmer.get_harvesters',
'chia_farmer.get_harvester_plots_duplicates',
'chia_farmer.get_harvester_plots_invalid',
'chia_farmer.get_harvester_plots_keys_missing',
'chia_farmer.get_harvester_plots_valid',
'chia_farmer.get_reward_targets',
'chia_harvester.get_harvester_config',
'chia_harvester.get_plot_directories',
'chia_harvester.refresh_plots',
'chia_data_layer.add_missing_files',
'chia_data_layer.check_plugins',
'chia_data_layer.clear_pending_roots',
'chia_data_layer.get_ancestors',
'chia_data_layer.get_keys',
'chia_data_layer.get_keys_values',
'chia_data_layer.get_kv_diff',
'chia_data_layer.get_local_root',
'chia_data_layer.get_mirrors',
'chia_data_layer.get_owned_stores',
'chia_data_layer.get_root',
'chia_data_layer.get_roots',
'chia_data_layer.get_root_history',
'chia_data_layer.get_sync_status',
'chia_data_layer.get_value',
'chia_data_layer.verify_offer',
'chia_data_layer.remove_subscriptions',
'chia_data_layer.subscribe',
'chia_data_layer.subscriptions',
'chia_data_layer.unsubscribe',
]);
export function isAllowedCommand(command: string): boolean {
return ALLOWED_COMMANDS_SET.has(command);
}