Language

Choose a language

/build/rpc / btc

walletpassphrasechange

walletpassphrasechange "oldpassphrase" "newpassphrase" Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'. Arguments: 1. oldpassphrase (string, required) The current passphrase 2. newpassphrase (string, required) The new passphrase Result: null (json null) Examples: > bitcoin-cli walletpassphrasechange "old one" "new one" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "walletpassphrasechange", "params": ["old one", "new one"]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

walletpassphrasechange(oldpassphrase: string, newpassphrase: string) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"walletpassphrasechange","params":["\"<oldpassphrase>\"","\"<newpassphrase>\""]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
oldpassphrasestringyesThe current passphrase
newpassphrasestringyesThe new passphrase

Result

Type:  any

null (json null)

Source: services/core-node/bcore/src/wallet/rpc/encrypt.cpp:115

C++ symbol: walletpassphrasechange