generatetodescriptor

generating dangerous since 0.20.0

mines to a specified descriptor and returns the block hashes.

Share: X Bluesky Mastodon Reddit HN
↑ shares the docs page. Use Share this query below for a link with your current arg values.
Not executable from the web. Would harm the node, the network, or expose secrets. Documentation only, never executable from the web.
Call from your own code

Replace $BITCOIN_RPC_USER / $BITCOIN_RPC_PASSWORD with credentials from your bitcoind's bitcoin.conf, and replace localhost:8332 with your node's RPC address. You can't run this RPC against our node, but you can run it against your own bitcoind.

Help

generatetodescriptor num_blocks "descriptor" ( maxtries )

Mine to a specified descriptor and return the block hashes.

Arguments:
1. num_blocks    (numeric, required) How many blocks are generated.
2. descriptor    (string, required) The descriptor to send the newly generated bitcoin to.
3. maxtries      (numeric, optional, default=1000000) How many iterations to try.

Result:
[           (json array) hashes of blocks generated
  "hex",    (string) blockhash
  ...
]

Examples:

Generate 11 blocks to mydesc
> bitcoin-cli generatetodescriptor 11 "mydesc"
← back to all RPCs