walletpassphrase
walletpassphrase "passphrase" timeout Stores the wallet decryption key in memory for 'timeout' seconds. This is needed prior to performing transactions related to private keys such as sending bitcoins Note: Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one. Arguments: 1. passphrase (string, required) The wallet passphrase 2. timeout (numeric, required) The time to keep the decryption key in seconds; capped at 100000000 (~3 years). Result: null (json null) Examples: Unlock the wallet for 60 seconds > bitcoin-cli walletpassphrase "my pass phrase" 60 Lock the wallet again (before 60 seconds) > bitcoin-cli walletlock As a JSON-RPC call > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "walletpassphrase", "params": ["my pass phrase", 60]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
walletpassphrase(passphrase: string, timeout: number) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"walletpassphrase","params":["\"<passphrase>\"",0]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| passphrase | string | yes | The wallet passphrase |
| timeout | number | yes | The time to keep the decryption key in seconds; capped at 100000000 (~3 years). |
Result
Type: any
null (json null)
Source: services/core-node/bcore/src/wallet/rpc/encrypt.cpp:11
C++ symbol: walletpassphrase