encryptwallet

encryptwallet "passphrase"

Encrypts the wallet with the provided ‘passphrase’. This function is intended for first-time encryption.

Once encrypted, any calls that involve private keys, such as sending or signing transactions, will require the passphrase to be set beforehand. Use the walletpassphrase command to unlock the wallet, and then walletlock to lock it again.

If the wallet is already encrypted, use the walletpassphrasechange command to change the passphrase.

Argument #1 – passphrase

Type: string, required

The passphrase to encrypt the wallet with. It must be at least 1 character long, but a longer passphrase is recommended for security.

Result

Name

Type

Description

str

string

A string with further instructions

Examples

Encrypt your wallet:

bitcoinevo-cli encryptwallet "my pass phrase"

Now set the passphrase to use the wallet, such as for signing or sending bitcoinevo:

bitcoinevo-cli walletpassphrase "my pass phrase"

Now we can do something like sign:

bitcoinevo-cli signmessage "address" "test message"

Now lock the wallet again by removing the passphrase:

bitcoinevo-cli walletlock

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "encryptwallet", "params": ["my pass phrase"]}' -H 'content-type: text/plain;' http://127.0.0.1:7332/