lockWallet method

Future<void> lockWallet(
  1. String password
)

Locks the wallet with the provided password.

This method sends a LockWalletRequest to lock the wallet.

Example:

await walletsService.lockWallet('password');

Implementation

Future<void> lockWallet(String password) async {
  if (!havenoChannel.isConnected) {
    throw DaemonNotConnectedException();
  }
  try {
    await havenoChannel.walletsClient!.lockWallet(LockWalletRequest());
  } on GrpcError catch (e) {
    handleGrpcError(e);
  }
}