WalletPasshraseChange

Requires wallet support. Requires an encrypted wallet.

The walletpassphrasechange RPC changes the wallet passphrase from ‘old passphrase’ to ‘new passphrase’.

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 current passphrase

Name Type Presence Description
Current Passphrase string Required
(exactly 1)
The current wallet passphrase

Parameter #2—the new passphrase

Name Type Presence Description
New Passphrase string Required
(exactly 1)
The new passphrase for the wallet

Result—null on success

Name Type Presence Description
result null Required
(exactly 1)
Always set to JSON null

Example

Change the wallet passphrase from “test” to “example”:

pai-cli -testnet walletpassphrasechange test example

(Success: no result printed.)

See also

  • 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.
  • 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.