Language

Choose a language

/build/rpc / btc

keypoolrefill

keypoolrefill ( newsize ) Refills each descriptor keypool in the wallet up to the specified number of new keys. By default, descriptor wallets have 4 active ranged descriptors ("legacy", "p2sh-segwit", "bech32", and "bech32m"), each with 1000 entries. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. Arguments: 1. newsize (numeric, optional, default=1000, or as set by -keypool) The new keypool size Result: null (json null) Examples: > bitcoin-cli keypoolrefill > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "keypoolrefill", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

keypoolrefill(newsize?: number) → any

Code samples

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

Parameters

NameTypeReq.Description
newsizenumberThe new keypool size

Result

Type:  any

null (json null)

Source: services/core-node/bcore/src/wallet/rpc/addresses.cpp:236

C++ symbol: keypoolrefill