-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 - name of the wallet-fee - validator's commission
Case 1: if you want to delegate m-tokens using your public certificate or public key
-cert - name of the public certificate -value - m-tokens sum (in datoshi) which is used for key delegationor-pkey - hash of the certificate-sign_type - type of signature (for example "sig_dil")-value - m-tokens sum (in datoshi) which is used for key delegation
Case 2: you have a hash of the validator or staker order to delegate m-tokens
-order - hash of the order (validator or staker)validator order:-tax_addr - wallet address for tax collecting (optional)staker order:-cert - name of the staker's private certificate for delegation-node_addr - address of the node which will be participated in consensus (optional)
SAVE TO TAKE ===>>> Stake transaction 0xC026FF57F4CCD376B6E00C1DE842988B9DD3F1366B61DBBE28ADFE272391C7C4 has done
JSON-RPC Example
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;delegate;-cert;mastercert;-net;foobar;-w;foobar_root_0;-value;10.0e+18;-node_addr;ABCD::0000::0000::0000;-fee;5.0e+18"], "id":"1"}'
Response:
{ "type": 0,"result": "SAVE TO TAKE ===>>> Stake transaction 0x6253453196BB5CEEA7CAF1E7C4D5B45608442881555850A741FB831E413DC84A has done","errors": null,"id": 1}
-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-tx - hash of the delegation transaction-w - the name of the wallet where funds will be returned-fee - commission sum*** or-siging_pkey_hash - public key hash of the signer-signing_pkey_type - type of the public key of a signer-poa_cert - root node certificate
If -w,-fee were specified, a transaction will be created
Transaction 0x908DAC21FD62DD1CE8DA2A4F41DE2550A05A6EE6C85ED582C231E2CB976AD776 has active delegated key 0x332EE135EB8D38045AFECD0E261AC1EE6CFCA6A3B171A3E67259709253AA4303, need to revoke it first
Response 2:
All m-tokens successfully returned to owner. Returning tx hash 0xD5E031714476D78C0CD59E5250BC9C7D4C7FDBFC2CAADF49154D021A822AB3B6.
If -poa_cert was specified then decree of key recall will be created
Specified delegated key invalidated. Created key invalidation decree 0x6A692BCC1186E138B971870A1DE738AE680341538B2163980D2D4378CC538BCB.Try to execute this command with -w to return m-tokens to owner
JSON-RPC Example
With wallet.
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;invalidate;-net;foobar;-tx;0x908DAC21FD62DD1CE8DA2A4F41DE2550A05A6EE6C85ED582C231E2CB976AD776;-w;foobar_master_1;-fee;5.0e+18"], "id":"1"}'
Response 1:
{ "type": 0,"result": "Transaction 0x908DAC21FD62DD1CE8DA2A4F41DE2550A05A6EE6C85ED582C231E2CB976AD776 has active delegated key 0x332EE135EB8D38045AFECD0E261AC1EE6CFCA6A3B171A3E67259709253AA4303, need to revoke it first","errors": null,"id": 1}
Response 2:
{ "type": 0,"result": "All m-tokens successfully returned to owner. Returning tx hash 0xD5E031714476D78C0CD59E5250BC9C7D4C7FDBFC2CAADF49154D021A822AB3B6.","errors": null,"id": 1}
With certificate.
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;invalidate;-net;foobar;-signing_pkey_hash;0x332EE135EB8D38045AFECD0E261AC1EE6CFCA6A3B171A3E67259709253AA4303;-signing_pkey_type;sig_dil;-poa_cert;foobar.root.pvt.0"], "id":"1"}'
Response:
{ "type": 0,"result": "Specified delegated key invalidated. Created key invalidation decree 0x4D7A33DE3D98F78E7A7D287C57225D0CB7AA067F3A39D454BC3AFF494585DA78.Try to execute this command with -w to return m-tokens to owner","errors": null,"id": 1}
-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-tx - hash of the transaction-poa_cert - certificate of the root node (proof of authority)
Lists active delegated keys and their parameters (optional - keys delegated with specified cert)
CLI Example
Command syntax:
srv_stake list keys -net <net_name> [-cert <delegated_cert> | -pkey <pkey_hash_str>]
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-cert/-pkey - name of the delegated certificate/ hash of the public key (optional)
Example:
Command:
cellframe-node-cli srv_stake list keys -net foobar
Response:
Pkey hash: 0x89B17A82EB5EC2E6192F9F5353B3C89F6995E4D12004A40515FD4E4C2D143A8E
Stake value: 1.0
Related weight: 33.333333333333333333%
Tx hash: 0x0000000000000000000000000000000000000000000000000000000000000000
Node addr: ABCD::EF00::0000::0000
Sovereign addr: N/A
Sovereign tax: 0.0%
Pkey hash: 0xC18BDA090E342709E95F556F80BF6D1104C6F8E16E4FA3E010557D85AA89FF7F
Stake value: 2.0
Related weight: 66.666666666666666666%
Tx hash: 0x696B2ACF794C48281C500586EAAC9AD5C4F51DD2C301BE685F486DAB4EB2CB84
Node addr: FA66::CE4F::4BD1::7BAD
Sovereign addr: N/A
Sovereign tax: 0.0%
Total keys count: 2
Total weight: 3.0 (3000000000000000000)
Minimum value for key delegating: 1.0 mBUZ
JSON-RPC Example
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;list;keys;-net;foobar"], "id":"1"}'
Response:
{ "type": 0,"result": "same as cli response","errors": null,"id": 1}
-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
-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-cert - name of the certificate-value - stake value (in datoshi)
Minimum stake value has been set. Decree hash 0x3C14ED115BE3E7A380C144C3D1811DC05327619AAFFACE47E082F063FFFD96E3
JSON-RPC Example
Command:
curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_stake", "params":["srv_stake;min_value;-net;foobar;-cert;foobar.root.pvt.0;-value;20.0e+18"], "id":"1"}'
Response:
{ "type": 0,"result": "Minimum stake value has been set. Decree hash 0xA1518C0B2E257164D82943C4D6BFF8E5C28712393AB22CF663B66C5E4C062A7E","errors": null,"id": 1}
Checks validator parameters which allow to participate in consensus
Parameters:
VERSION - node version
AUTO_PROC - transactions autoprocessing
ORDER - availability of order
AUTO_ONLINE - regime of automatic network connection
AUTO_UPDATE - regime of automatic update
DATA_SIGNED - data should be signed
FOUND CERT - availability of certificate for signing
SIGN CORRECT - signing must be provided by the key which was delegated
SUMMARY- if everything is ok - displays “Validator ready”, if not - “There are unresolved issues”
All parameters must be enabled for proper work.
CLI Example
Command syntax:
srv_stake check -net <net_name> -tx <tx_hash>
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-tx - hash of the transaction