Requires wallet support.
The encryptwallet RPC 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.
if using this RPC on the command line, remember
that your shell probably saves your command lines (including the value
of the passphrase parameter). In addition, there is no RPC to completely
disable encryption. If you want to return to an unencrypted wallet, you
must create a new wallet and restore your data from a backup made with
Parameter #1—a passphrase
|The passphrase to use for the encrypted wallet. Must be at least one character|
Result—a notice (with program shutdown)
|A notice that the server is stopping and that you need to make a new backup. The wallet is now encrypted|
pai-cli -testnet encryptwallet "test"
wallet encrypted; pai server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.
WalletPassphrase: 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.
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.
WalletPassphraseChange: changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.