Collects all commission from the specified blocks.
Request Structure
JSON object:
{
"method": "block",
"subcommand": ["collect","fee"],
"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 fees
hashes
- list of block hashes for collecting fees
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","fee"],
"arguments": {
"net": "subzero",
"chain": "main",
"cert": "subzpay",
"addr": "mJUUJk6Yk2gBSTjcEUb15ATxj2BkxP1YcFkmMrP8bkDAGF6QME4Fxi3yuKD26xGjkxc51GPJ6oq7caCmRq5Y52mxHgJY3vfSYbTrzYWw",
"hashes": "mJUUJk6Yk2gBSTjcEUb15ATxj2BkxP1YcFkmMrP8bkDAGF6QME4Fxi3yuKD26xGjkxc51GPJ6oq7caCmRq5Y52mxHgJY3vfSYbTrzYWw",
"fee": "0.05e+18"
},
"id": "1"
}'
Response:
{
"type": 2,
"result": [
{
"TX for fee collection created succefully, hash ": "0x79C413D16E199F658E49773A0FD252DBECA8C6B2C909AD2F0DCFA1DBF3D95074"
}
],
"id": 1
}