Requires wallet support. Requires an encrypted wallet.
walletpassphrase RPC stores the wallet decryption key in memory for the indicated number of seconds. Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one.
WARNING: if using this RPC on the command line, remember
that your shell probably saves your command lines (including the
value of the passphrase parameter).
Parameter #1—the passphrase
|The passphrase that unlocks the wallet|
Parameter #2—the number of seconds to leave the wallet unlocked
|The number of seconds after which the decryption key will be automatically deleted from memory|
null on success
|Always set to JSON
Unlock the wallet for 10 minutes (the passphrase is “test”):
pai-cli -testnet walletpassphrase test 600
(Success: no result printed.)
EncryptWallet: encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys.
WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.
WalletLock: removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.