Invalidates delegated stake transaction either by hash, cert name or cert public key hash and returns locked m-tokens to the wallet if specified

CLI Example

Command syntax:

srv_stake invalidate -net <net_name> {-tx <transaction_hash> -w <wallet_name> -fee <value> | -siging_pkey_hash <pkey_hash> -signing_pkey_type <pkey_type> -poa_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
 
-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

Command:

cellframe-node-cli srv_stake invalidate 
-net foobar 
-tx 0x908DAC21FD62DD1CE8DA2A4F41DE2550A05A6EE6C85ED582C231E2CB976AD776 
-w foobar_master_1 
-fee 5.0e+18

Response 1:

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

Command:

cellframe-node-cli srv_stake invalidate -net foobar -signing_pkey_hash 0x332EE135EB8D38045AFECD0E261AC1EE6CFCA6A3B171A3E67259709253AA4303 -signing_pkey_type sig_dil  -poa_cert foobar.root.pvt.0

Response:

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
}