* // { privateKey: <...>, index: 1 }\r
* ```\r
*\r
+ * If `from` is greater than `to`, their values will be swapped.\r
* @param {number} from - Start index of secret keys. Default: 0\r
* @param {number} to - End index of secret keys. Default: `from`\r
* @returns {AccountList} Object with keys of account indexes and values of the corresponding Accounts\r
*/\r
async accounts (from: number = 0, to: number = from): Promise<AccountList> {\r
- if (from > to) {\r
- const swap = from\r
- from = to\r
- to = swap\r
- }\r
+ if (from > to) [from, to] = [to, from]\r
const output = new AccountList()\r
const indexes: number[] = []\r
for (let i = from; i <= to; i++) {\r