personalLockAccount method
Removes the private key with given address from memory. The account can no longer be used to send transactions.
Implementation
Future<bool> personalLockAccount(EthereumAddress? address) async {
if (address == null) {
throw ArgumentError.notNull('Ethereum::personalLockAccount - address');
}
const method = EthereumRpcMethods.lockAccount;
final params = <String?>[address.asString];
final dynamic res = await _client.rpcClient.request(method, params);
if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
return true;
}
_client.processError(method, res);
return false;
}