INNER CODE UNIT · TypeScript
get_wallets_from_file
Deezzir/solana-bot · src/bot.ts:49
async function get_wallets_from_file(file: string): Promise<common.Wallet[]> {
try {
const wallets = await common.get_wallets(file);
if (wallets.length === 0) common.error(common.yellow('The file does not contain any wallets.'));
return wallets;
} catch (error) {
common.error(common.yellow(`${error}`));
}
return [];
}
function get_priority_option(): Option {
return new Option('--pr, --priority <level>', 'specify priority level')
.choices(Object.values(PriorityLevel) as string[])
.default(PriorityLevel.DEFAULT, PriorityLevel.DEFAULT);
}
function get_json_config_option(): Option {