bitcoind.app
CommandsGuidesContact ↗
Home/Generating/generatetodescriptor
Generating

generatetodescriptor

Mine blocks immediately to a specified descriptor (for regtest mode).

Parameters

nblocksnumberREQUIRED
How many blocks to generate
descriptorstringREQUIRED
The descriptor to send new coins to
maxtriesnumberoptional
Max iterations to try. Default: 1000000

Returns

arrayArray of block hashes

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"generatetodescriptor","params":[1,"addr(bcrt1q...)"]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

["0000000036d51f27d..."]
← Previous
generatetoaddress
Next →
getblocktemplate

More Generating Commands

generateblockgeneratetoaddress

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗