Generating RPC Commands
Documentation for Raptoreum Generating RPC calls.
generatetoaddress
Mine blocks immediately to a specified address (before the RPC call returns)
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 3 | maxtries |
numeric | Optional | 1000000 | See CLI help for details |
Result
[ (json array) hashes of blocks generated
"hex", (string) blockhash
...
]
Examples
Generate 11 blocks to myaddress
raptoreum-cli generatetoaddress 11 "myaddress"
If you are running the Raptoreum Core wallet, you can get a new address to send the newly generated coins to with:
raptoreum-cli getnewaddress
generatetodescriptor
Mine blocks immediately to a specified descriptor (before the RPC call returns)
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 3 | maxtries |
numeric | Optional | 1000000 | See CLI help for details |
Result
[ (json array) hashes of blocks generated
"hex", (string) blockhash
...
]
Examples
Generate 11 blocks to mydesc
raptoreum-cli generatetodescriptor 11 "mydesc"
setgenerate
Set 'generate' true or false to turn generation on or off.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
Examples
Set the generation on with a limit of one processor
raptoreum-cli setgenerate true 1
Check the setting
raptoreum-cli getgenerate
Turn off generation
raptoreum-cli setgenerate false
Using json rpc
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setgenerate", "params": [true, 1] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/