[resolved] How to get accounts from the local HDWallet

Hi there!

I’m an Ethereum developer and I’m trying to get the second account from the local wallet.
I created two accounts and added them to the local wallet with kit.addAccount(acc.privateKey);

In Eth, I’d do something like this:
const secondAcc = web3.eth.accounts.wallet[1];

How should I do that in CELO? I guess my general question is: how does one get the list of accounts in the local wallet?

Found it looking at the code here: https://github.com/celo-org/celo-monorepo/blob/008a1931fd5622ccf699cf7b9a121ec4e33c0a96/packages/contractkit/src/providers/celo-provider.ts#L24

To get the local accounts, do this inside an async function:

const accs = await kit.web3.currentProvider.getAccounts();

I might have missed this information when reading the docs. Couldn’t find it.