accounts method

Future<List<EthereumAddress>?> accounts()

Accounts, a list of addresses owned by client.

Implementation

Future<List<EthereumAddress>?> accounts() async {
  const method = EthereumRpcMethods.accounts;
  final dynamic res = await _client.rpcClient.request(method);
  if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
    return EthereumAddress.toList(
        res[EthereumConstants.ethResultKey].cast<String>());
  }
  _client.processError(method, res);
  return null;
}