RPC Browser

Arguments


Help Content

generatetoaddress nblocks "address" ( maxtries )

Mine blocks immediately to a specified address (before the RPC call returns)

Arguments:
1. nblocks     (numeric, required) How many blocks are generated immediately.
2. address     (string, required) The address 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 myaddress
> bitcoin-cli generatetoaddress 11 "myaddress"
If you are using the Bitcoin Core wallet, you can get a new address to send the newly generated bitcoin to with:
> bitcoin-cli getnewaddress 

nblocks

{
    "name": "nblocks",
    "detailsLines": [],
    "properties": [
        "numeric",
        "required"
    ],
    "description": "How many blocks are generated immediately."
}

address

{
    "name": "address",
    "detailsLines": [],
    "properties": [
        "string",
        "required"
    ],
    "description": "The address to send the newly generated bitcoin to."
}

maxtries

{
    "name": "maxtries",
    "detailsLines": [],
    "properties": [
        "numeric",
        "optional",
        "default=1000000"
    ],
    "description": "How many iterations to try."
}

Recent (2)

Blockchain (25)

Control (6)

Generating (3)

Mining (6)

Network (13)

Rawtransactions (17)

Signer (1)

Util (8)

Wallet (61)

Zmq (1)