Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AccountCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "account", } getAccountCmd := &cobra.Command{ Use: "get", Short: "get account info", Args: cobra.ExactArgs(1), Run: getAccount, } cmd.AddCommand(getAccountCmd) return cmd }
View Source
var BpCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "bp", } registerCmd := &cobra.Command{ Use: "register", Short: "register as a new block-producer", Example: "bp register [bpname] [pubkey]", Args: cobra.ExactArgs(2), Run: registerBP, } registerCmd.Flags().StringVarP(&bpUrlFlag, "url", "u", "", `bp register alice --url "http://example.com"`) registerCmd.Flags().StringVarP(&bpDescFlag, "desc", "d", "", `bp register alice --desc "Hello World"`) registerCmd.Flags().Uint64VarP(&bpCreateAccountFee, "fee", "f", 1, `bp register alice --fee 1`) registerCmd.Flags().Uint32VarP(&bpBlockSize, "blocksize", "b", 1024*1024, `bp register alice --blocksize 1024`) unregisterCmd := &cobra.Command{ Use: "unregister", Short: "unregister a block-producer", Example: "bp unregister [bpname]", Args: cobra.ExactArgs(1), Run: unRegisterBP, } voteCmd := &cobra.Command{ Use: "vote", Short: "vote to a block-producer or unvote it", Example: "bp vote [voter] [bpname]", Args: cobra.ExactArgs(2), Run: voteBp, } voteCmd.Flags().BoolVarP(&bpVoteCancel, "cancel", "c", false, `bp vote alice bob --cancel`) cmd.AddCommand(registerCmd) cmd.AddCommand(unregisterCmd) cmd.AddCommand(voteCmd) return cmd }
View Source
var ChainStateCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "chainstate", Short: "get chainstate info", Run: getChainState, } return cmd }
View Source
var ClaimAllCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "claimAll", Short: "claim account all reward", Example: "claimAll [account]", Args: cobra.ExactArgs(1), Run: rewardClaimAll, } return cmd }
View Source
var ClaimCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "claim", } queryCmd := &cobra.Command{ Use: "query", Short: "query account reward", Example: "claim query [account]", Args: cobra.ExactArgs(1), Run: queryClaim, } rewardCmd := &cobra.Command{ Use: "reward", Short: "claim account reward", Example: "claim reward [account] [amount]", Args: cobra.ExactArgs(2), Run: rewardClaim, } cmd.AddCommand(queryCmd) cmd.AddCommand(rewardCmd) return cmd }
View Source
var CloseCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "close", Short: "close the wallet-cli", Run: closec, } return cmd }
View Source
var CreateCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "create", Short: "create a new account", Example: "create [creator] [name]", Args: cobra.ExactArgs(2), Run: create, } return cmd }
View Source
var FollowCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "follow", Short: "follow an author", Example: "follow [follower] [following]", Args: cobra.ExactArgs(2), Run: follow, } cmd.Flags().BoolVarP(&followCancel, "cancel", "c", false, `follow alice bob --cancel`) return cmd }
View Source
var FollowCntCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "follow_count", Short: "get account follow relation", Example: "follow_count [account_name]", Args: cobra.ExactArgs(1), Run: followCnt, } return cmd }
View Source
var GenKeyPairCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "genKeyPair", Short: "generate new key pair", Run: genKeyPair, } return cmd }
View Source
var ImportCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "import", Short: "import an account", Example: "import [name] [privkey]", Args: cobra.ExactArgs(2), Run: importAccount, } cmd.Flags().BoolVarP(&importForceFlag, "force", "f", false, "import --force") return cmd }
View Source
var InfoCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "info", Short: "display an unlocked account's info", Example: "info alice", Args: cobra.ExactArgs(1), Run: info, } return cmd }
View Source
var IsLockedCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "locked", Short: "whether a account has been locked", Args: cobra.ExactArgs(1), Run: isLocked, } return cmd }
View Source
var ListCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "list", Short: "list all accounts", Run: list, } return cmd }
View Source
var LoadAllCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "loadAll", Short: "load all accounts in default path", Args: cobra.ExactArgs(0), Run: loadAll, } return cmd }
View Source
var LoadCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "load", Short: "load a created account", Args: cobra.ExactArgs(1), Run: load, } return cmd }
View Source
var LockCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "lock", Short: "lock a account", Args: cobra.ExactArgs(1), Run: lock, } return cmd }
View Source
var MultinodetesterCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "multinodetester", Short: "multinodetester count", Example: "multinodetester count", Args: cobra.ExactArgs(1), Run: multinodetester, } return cmd }
View Source
var PostCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "post", Short: "post a topic", Example: "post [author] [tags] [title] [content]", Args: cobra.ExactArgs(4), Run: post, } cmd.Flags().StringToIntVarP(&postBeneficiaryRoute, "beneficiary", "b", map[string]int{}, `post --beneficiary="Alice=5,Bob=10"`) return cmd }
View Source
var ReplyCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "reply", Short: "reply a topic", Example: "reply [author] [content] [postId]", Args: cobra.ExactArgs(3), Run: reply, } cmd.Flags().StringToIntVarP(&replyBeneficiaryRoute, "beneficiary", "b", map[string]int{}, `reply --beneficiary="Alice=5,Bob=10"`) return cmd }
View Source
var StressCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "stress", Short: "stress thread-count initminer alicex 1", Long: "stress thread-count transfer cos from one account to another account", Example: "stress 2 initminer alicex 1", Args: cobra.MinimumNArgs(4), Run: stress, } return cmd }
View Source
var SwitchPortcmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "switchport", Short: "switchport port", Example: "switchport port", Args: cobra.ExactArgs(1), Run: switchport, } return cmd }
View Source
var TransferCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "transfer", Short: "transfer to another account", Long: "transfer cos to another account by name, should unlock sender first", Example: "transfer alice bob 500", Args: cobra.MinimumNArgs(3), Run: transfer, } return cmd }
View Source
var TransferVestingCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "transfer_vesting", Short: "convert cos to vesting", Long: "convert amounts of liquidity cos to vesting", Example: "transfer_vesting alice alice 500", Args: cobra.ExactArgs(3), Run: transferVesting, } return cmd }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.