Stratos-chain 'stchaincli' Commands(Part2)

This document is the secon part that describes a summarized list of 'stchaincli' commands for Stratos-chain.

Overview

For ease of use, these commands have been classified by the following modules:

PART 2:

PART 1:

'stchaincli' Commands

Global Flags

Each command has its specific flags as well as several global flags. The specific flags will be explained along with each command, while the global flags are summarized as the following that can be used for all stchaincli commands.

--chain-id the current chain-id may change when updating in testing phase . When it is applied, user needs to point out current chain-id which can be found on this page, right next to the search bar at the top of the page.

--home is the directory containing a node's account information. By default, node's account info is saved or created under $HOME/.stchaincli. In this case, user does not need to add --home flag in the commands. Otherwise, user has to use this flag to specify the path to the node's root directory(default '$HOME') explicitly if not using the default directory. In the following instruction, we suppose the node info has been installed or created under $HOME/.stchaincli and skip the --home flag. User can add it where applicable.

Register Module

Transactions

-create-resource-node

Create a new resource node

Tx command:

Example:

Check if the new resource node in the resource-node list using REST API

Response:

-update-resource-node

Update a resource node info

Tx command:

Example:

Check if the new resource node info has been modified using REST API

Response:

-remove-resource-node

remove a resource node

Tx command:

Example:

Check if the resource node has benn removed from the resource-node list using REST API

Response:

-create-indexing-node

Create a new indexing node

Tx command:

Example:

-indexing_node_reg_vote

Indexing nodes vote for the registration of a new indexing node

Tx command:

Example:

Check if the new indexing node info has been modified using REST API

Response:

-update-indexing-node

Update indexing node info

Tx command:

Example:

Check if the new indexing node info has been modified using REST API

Response:

-remove-indexing-node

Remove an indexing node

Tx command:

Example:

Check if the indexing node has been removed from the indexing-node list using REST API

Response:

Queries

get-resource-nodes

Query all resource nodes by network id or moniker

Query by network-id:

Example:

Query by moniker:

Example:

get-indexing-nodes

Query all indexing nodes by network id or moniker

Query by network-id:

Example:

Query by moniker:

Example:

Sds Module

Transactions

-upload

Create and sign a file upload tx

Tx command:

Example:

-prepay

Create and sign a prepay tx

Tx command:

Example:

Queries:

upload

Query uploaded file info by hash

Query command:

Example:

prepay

Query balance of prepayment in volume Pool

Query command:

Example:

Pot Module

Transactions

-foundation-deposit

Deposit to foundation account

Tx command:

Example:

-report

Create and sign a pot volume report tx

Tx command:

Example:

check volume report using query command

Example:

Also, we can get a concise response from REST API

Response:

-withdraw

withdraw POT reward

Tx command:

Example:

Queries

report

Query volume report by epoch

Query command:

Example:


Last updated