Unlocking and Locking the Wallet
When created wallet is unlocked by default. Wallet can be locked instantly by a command or automatically after 15 minutes of wallet being unactive. Wallet is active as long as you use it for signing transactions.
Show Wallets and Status
To check whether wallet is unlocked you can execute cline wallet list
command
Wallets: [ "customWallet", "default" ]
Command will print available wallets on your inery node. If wallet name has *
at the end of wallet name that represent unlocked wallet which keys can be used for signing transactions.
In example above bout wallets are locked.
Unlock wallet
Now to unlock wallet you need to type cline wallet unlock
command, followed by wallet password
password: <your_default_wallet_password>
Type or copy paste default wallet password and press Enter. if wallet password is corret default wallet will be unlocked.
You will be notified with Unlocked: default
output.
Now if we call cline wallet list
Wallets:
[
"customWallet",
"default *"
]
We can see that default wallet has *
which indicate that its unlocked.
- You can unlock wallet in signle line providing
--password
flagcline wallet unlock --password <your_default_wallet_password>
- If you want to use another wallet just provide
--name
flag followed by the name of the wallet.
If you dont provide --name flag command will refer to default wallet.
Lock wallet
To lock default wallet execute cline wallet lock
command.
just provide --name
flag followed by the name of the wallet.
Lock All Wallets
Using cline wallet lock_all
you can lock all wallets with one command