Collects rewards from the definite blocks on the wallet (using address).
Request Structure
JSON object:
{
"method": "block",
"subcommand": ["collect","reward"],
"arguments": {
"net": "network_name",
"chain": "chain_name",
"cert": "priv_cert_name",
"addr": "address",
"hashes": "list_of_hashes",
"fee": "value"
},
"id": "1"
}
Parameters:
net (network_name)
- name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network
folder or received using - Node Command - NET LIST
chain
- the name of chain (main
or zerochain
)
cert
- name of the private master node certificate
addr
- wallet address for collecting rewards
hashes
- list of block hashes for collecting rewards
fee
- commission for transactions in the network
If you make a request in the Cellframe network, use parameter chain:main
.
Curl Example
Request:
curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
"method": "block",
"subcommand": ["collect","reward"],
"arguments": {
"net": "raiden",
"chain": "main",
"cert": "raiden.my_cool_cert ",
"addr": "jrmnGqeeds4Dp67AcKWcuMdcEk1w93oKzAGr9rGQNMvxXn3hgGmtVpee75rsaNxAWUxiGcMUvhjiNdmxhA9pUPdiZy51ZeJhYx8SNxf5",
"hashes": "0x60A5C7195D06AC0D2105B7E5F0811C3FAFEC93050E90EE90D00F0C27F641A1B9,0x450E653C5B4A9B8D810D93FDC717DB8B8F9BE5570B93841C3F6E2A0E311E2D51",
"fee": "0.05e+18"
},
"id": "1"
}'
Response:
{
"type": 2,
"result": [
{
"TX for reward collection created succefully, hash": "0x743C12582E3A17239D0DE8F6D9FB0B0C7555BB0C0827AA79B7ABF31590E470D4"
}
],
"id": 1
}