Creates order which allows staker to give definite amount of m-tokens to master-node holder. From his side, master node holder delegates his private key to staker and also must send to him percent from profit in future.
CLI Example
Command syntax:
srv_stake order create staker
-net <net_name>
-w <wallet_with_m_tokens>
-value <stake_value>
-fee <value>
-tax <percent>
[-addr <for_tax_collecting>]
[-cert <for_order_signing>]
[-H {hex(default) | base58}]
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
w - wallet with delegated token (which is used to pay master node delegation)
-fee - comission in datoshi
-tax - percentage of the master node rewards that staker will collect for providing the m-tokens for the master node
-addr - wallet address for tax collecting
-cert - name of the private certificate which is used to sign blocks
-H - the format of the hash value for the command parameter. It can be either in HEX format: 0x4E9B6B890D5D78BB46AA5442BDEFF2FPDA8929BA9689F86235353BF784B5 or in Base58: Betcryb4arefsamtjars9dxydzasszdfkkh6
Example:
Command:
cellframe-node-cli srv_stake order create staker
-net foobar
-w foobar_root_0
-value 10.0e+18
-tax 25.0
-addr ptV4n68gTebdUTcbkPcG6JNM5r7vzBweHx3WDcTJ9QTKxDczB79D63sk582X4DuBHxaxhYNB8KmzxJGRPDWMQYgqRrMxYpKUYVD9N7ve
-cert mastercert
-fee 5.0e+18
Response:
Successfully created order 0x79B4426EBACE52B9092BCD861511307D4249F2EF2781655BFB96A96235834B85
SAVE TO TAKE ===>>> Order tx hash = 0x44C04F554A9140AFF9D7611C324866F40491CCC93726410F24A3A9F3790FCB09
JSON-RPC Example
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;order;create;staker;-net;foobar;-w;foobar_root_0;-value;10.0e+18;-tax;25.0;-addr;ptV4n68gTebdUTcbkPcG6JNM5r7vzBweHx3WDcTJ9QTKxDczB79D63sk582X4DuBHxaxhYNB8KmzxJGRPDWMQYgqRrMxYpKUYVD9N7ve;-cert;mastercert;-fee;5.0e+18"], "id":"1"}'
Response:
{
"type": 0,
"result": "Successfully created order 0xCEC86F32A08611941A31FBCFA568A5E5C1F9A3AA3647EFF30046C4A336BE934E\nSAVE TO TAKE ===>>> Order tx hash = 0x43BEBEDAC5887539009B796D97C62CC8312C116C338D8B663E1B54C990B7ED29",
"errors": null,
"id": 1
}