Collects rewards from the definite blocks on the wallet (using address).

Command syntax:

block collect reward 
-net <net_name> 
-chain <chain_name> 
-cert <priv_cert_name> 
-addr <addr> 
-hashes <hashes_list> 
-fee <value>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-chain - the name of Chain. The list of chains can be found in the directory <Config_dir> \ etc \ network \ <network_name> or by the Cellframe-Node-CLI using command - net list chains
-cert - name of the private master node certificate
-addr - wallet address for collecting reward
-hashes - list of blocks (hashes) from which reward will be collected
-fee - commission for transaction 

If you request command in the Cellframe network, use parameter -chain main.

CLI Example

Command:

cellframe-node-cli block reward collect 
-hashes 0x257676AF454C7751F171B4AFEACC1DA24E676818C01F37136C692FB2A3E6EE9A 
-cert raiden.my_cool_cert 
-fee 5.0e+16 
-net raiden  
-chain main 
-addr jrmnGqeeds4Dp67AcKWcuMdcEk1w93oKzAGr9rGQNMvxXn3hgGmtVpee75rsaNxAWUxiGcMUvhjiNdmxhA9pUPdiZy51ZeJhYx8SNxf5

Response:

TX for reward collection created succefully, hash=0xBCECBBF52782E64266980E4234BFD0F1B8AB4B64A1D9BC4237F01051BC7CB9AF

JSON-RPC Example

JSON-RPC Request - BLOCK COLLECT REWARD

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
}
Link to original