dcr

Decred (DCR)

Method: POST setgenerate

dropdown
POST

setgenerate

Method not allowed

Set the server to generate coins (mine) or not.

NOTE: Since dcrd does not have the wallet integrated to provide payment addresses, dcrd must be configured via the --miningaddr option to provide which payment addresses to pay created blocks to for this RPC to function.

Parameters

generate - boolean

set to true to enable generation, false to disable it.

genproclimit - numeric, optional

the number of processors (cores) to limit generation to or -1 for default.

Request

curl --location --request POST 'https://dcr.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "setgenerate",
"params": [null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}