Node commands for work with STAKE ORDERS:

Node Command - SRV_STAKE ORDER CREATE

Creates order for fee that validator requires for his work

CLI Example

Command syntax:

srv_stake order create [type] 
-net <net_name> 
-value <value> 
-cert <priv_cert_name> 
[-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
-value - cost of transaction in datoshi
-cert - name of the private certificate which is used to sign blocks
type - "fee" by default
-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 
-net foobar 
-value 0.05e+18 
-cert foobar.master.pvt.0

Response:

 Successfully created order 0x75578C57AAE25B7FB0F05213865B03FAAF7814A2162DAD350064B7DED4CD48C1

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;order;create;-net;foobar;-value;0.05e+18;-cert;foobar.master.pvt.0"], "id":"1"}'

Response:


"type": 0,
"result": "Successfully created order 0x451E0BBB9510A228A267EA85DDBAD63686750E753FF6A26571586D57238501FD",
"errors": null,
"id": 1
}
Link to original

Node Command - SRV_STAKE ORDER CREATE VALIDATOR

Creates order of validator which allows machine owner who doesn’t have m-tokens to establish master node.

Alias for the command - Locked Token Delegated Key Order (LTDKO)

CLI Example

Command syntax:

srv_stake order create validator 
-net <net_name> 
-value_min <minimum_stake_value> 
-value_max <maximum_stake_value> 
-tax <percent> 
-cert <priv_cert_name> 
[-node_addr <for_validator_node>] 
[-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
-value_min - minimum stake value cost
-value_max - maximum stake value cost
-tax - percentage of the master node rewards that staker will collect for providing the m-tokens for the master node
-cert - name of the private certificate which is used to sign blocks
-node-addr - address for validator node
-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 validator 
-net foobar 
-value_min 5.0e+18 
-value_max 15.0e+18 
-tax 50.0 
-cert mastercert 
-node_addr ABCD::0000::0000::0000

Response:

Successfully created order 0x74C987DCF6FB5AA6BB89300E86EEE17E16A6549399C1BC933E54ADFC8A50CA65

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;order;create;validator;-net;foobar;-value_min;5.0e+18;-value_max;15.0e+18;-tax;50.0;-cert;mastercert;-node_addr;ABCD::0000::0000::0000"], "id":"1"}'

Response:


"type": 0,
"result": "Successfully created order 0x49311FEF0D008E13D51083CF04ACBE874C309CCBC3416583E8A7923D9F415904",
"errors": null,
"id": 1
}
Link to original

Node Command - SRV_STAKE ORDER CREATE STAKER

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

Node Command - SRV_STAKE ORDER LIST

Lists srv-stake orders of specified type within specified net name

CLI Example

Command syntax:

srv_stake order list 
[fee | validator | staker] 
-net <net_name>

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
-fee/validator/staker - extra parameter (type of order - optional)

Example:

Command:

cellframe-node-cli srv_stake order list 
-net foobar

Response:

Order 0x75ECF19E4C0A53B4517981CDB3CD3AC84CC8C018CD1D3BB9A1C0B4C65A27F23E ==
  version:      	3
  direction:    	SERV_DIR_SELL
  created:      	Wed, 14 Feb 2024 13:10:09 +0000
  srv_uid:      	0x0000000000000013
  price:        	2.0 (2000000000000000000)
  price_token:  	BUZ
  units:        	1
  price_unit:   	PIECES
  node_addr:    	ABCD::EF00::0000::0000
  node_location:	None - None
  tx_cond_hash: 	0x0000000000000000000000000000000000000000000000000000000000000000
  ext:          	0x0
  pkey:         	0xFB53C0202DBDE1ED42BFAA38935E0036E1CA96E282AB2087E0BEDCAF0D9792C6
Value in this order type means minimum fee for validator acceptable for process transactions

== Order 0x8ABFFB3EB98CA079C00E3BF1152F7CF1F1BEAF5385F48EFF573941C1BFAEF80B ==
  version:      	3
  direction:    	SERV_DIR_SELL
  created:      	Wed, 14 Feb 2024 13:10:09 +0000
  srv_uid:      	0x0000000000000013
  price:        	4.0 (4000000000000000000)
  price_token:  	BUZ
  units:        	1
  price_unit:   	PIECES
  node_addr:    	73FF::96C4::AF70::B047
  node_location:	None - None
  tx_cond_hash: 	0x0000000000000000000000000000000000000000000000000000000000000000
  ext:          	0x0
  pkey:         	0x710C7C81A9DB8844603797975F7CF3541D12B66A904246A27658F22F110AD802
Value in this order type means minimum fee for validator acceptable for process transactions

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;order;list;-net;foobar"], "id":"1"}'

Response:


"type": 0,
"result": "same as cli response",
"errors": null,
"id": 1
}
Link to original

Node Command - SRV_STAKE ORDER REMOVE

Removes order with specified hash

CLI Example

Command syntax:

srv_stake order remove 
-net <net_name> 
-order <order_hash> 
-cert <cert_name>

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
-order - hash of the order
-cert - name of the certificate used to sign order

Example:

Command:

cellframe-node-cli srv_stake order remove 
-net foobar 
-order 0x5B0401700CDAC57C9BB73344E5BA1AFAA344AA322F6B855C23D779B86ADCAE50

Response:

Stake order successfully removed

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;order;remove;-net;foobar;-order;0x451E0BBB9510A228A267EA85DDBAD63686750E753FF6A26571586D57238501FD"], "id":"1"}'

Response:


"type": 0,
"result": "Stake order successfully removed",
"errors": null,
"id": 1
}
Link to original