One more question, unlocking for staking is valid for some time or until wallet is closed?
I am considering to put 5 btc on staking (in Clam of course) for long time.
Safety is very important for me.
Am I safe if wallet.dat is stolen and encrypted (but unlocked for staking only).
If you use the RPC call to unlock it, you have to specify a number of seconds to leave it unlocked for.
I'm not familiar with how the GUI works. I never use it.
The wallet.dat file itself doesn't change when it is unlocked. The password is in RAM only. So if someone steals the file all they get is the encrypted version. But if they're smart they'll look in RAM and grab the password from there. "unlock for staking" still requires your private keys to be accessible to the client, and so they're also theoretically available to anyone with access to your system.