@agoric/cosmos 0.34.2-dev-55a0902.0 → 0.34.2-dev-853cca5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,12 +29,12 @@ const (
29
29
  // AddGenesisAccountCmd returns add-genesis-account cobra Command.
30
30
  func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command {
31
31
  cmd := &cobra.Command{
32
- Use: "add-genesis-account [address_or_key_name] [coin][,[coin]]",
32
+ Use: "add-genesis-account <address_or_key_name> <coin>[,...]",
33
33
  Short: "Add a genesis account to genesis.json",
34
- Long: `Add a genesis account to genesis.json. The provided account must specify
35
- the account address or key name and a list of initial coins. If a key name is given,
36
- the address will be looked up in the local Keybase. The list of initial tokens must
37
- contain valid denominations. Accounts may optionally be supplied with vesting parameters.
34
+ Long: `Add a genesis account to genesis.json.
35
+ If the address is specified by name, it will be looked up in the local Keybase.
36
+ The comma-separated list of initial tokens must contain valid denominations.
37
+ Accounts may optionally be supplied with vesting parameters.
38
38
  `,
39
39
  Args: cobra.ExactArgs(2),
40
40
  RunE: func(cmd *cobra.Command, args []string) error {
@@ -37,7 +37,7 @@ import (
37
37
 
38
38
  var (
39
39
  flagNodeDirPrefix = "node-dir-prefix"
40
- flagNumValidators = "v"
40
+ flagNumValidators = "validator-count"
41
41
  flagOutputDir = "output-dir"
42
42
  flagNodeDaemonHome = "node-daemon-home"
43
43
  flagStartingIPAddress = "starting-ip-address"
@@ -48,13 +48,13 @@ func testnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalance
48
48
  cmd := &cobra.Command{
49
49
  Use: "testnet",
50
50
  Short: fmt.Sprintf("Initialize files for a %s testnet", AppName),
51
- Long: `testnet will create "v" number of directories and populate each with
51
+ Long: `testnet will create one directory per validator and populate each with
52
52
  necessary files (private validator, genesis, config, etc.).
53
53
 
54
54
  Note, strict routability for addresses is turned off in the config file.
55
55
 
56
56
  Example:
57
- agd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2
57
+ agd testnet -n 4 --output-dir ./output --starting-ip-address 192.168.10.2
58
58
  `,
59
59
  RunE: func(cmd *cobra.Command, _ []string) error {
60
60
  clientCtx, err := client.GetClientQueryContext(cmd)
@@ -74,6 +74,13 @@ Example:
74
74
  numValidators, _ := cmd.Flags().GetInt(flagNumValidators)
75
75
  algo, _ := cmd.Flags().GetString(flags.FlagKeyAlgorithm)
76
76
 
77
+ if cmd.Flags().Changed("v") {
78
+ if cmd.Flags().Changed(flagNumValidators) {
79
+ return fmt.Errorf("--%s and --v are mutually exclusive", flagNumValidators)
80
+ }
81
+ numValidators, _ = cmd.Flags().GetInt("v")
82
+ }
83
+
77
84
  return InitTestnet(
78
85
  clientCtx, cmd, config, mbm, genBalIterator, outputDir, chainID, minGasPrices,
79
86
  nodeDirPrefix, nodeDaemonHome, startingIPAddress, keyringBackend, algo, numValidators,
@@ -81,9 +88,13 @@ Example:
81
88
  },
82
89
  }
83
90
 
84
- cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with")
91
+ cmd.Flags().IntP(flagNumValidators, "n", 4, "Number of validators to initialize the testnet with")
92
+ cmd.Flags().Int("v", 4, fmt.Sprintf("Alias for --%s", flagNumValidators))
93
+ if vFlag := cmd.Flags().Lookup("v"); vFlag != nil {
94
+ vFlag.Deprecated = fmt.Sprintf("use --%s", flagNumValidators)
95
+ }
85
96
  cmd.Flags().StringP(flagOutputDir, "o", "./mytestnet", "Directory to store initialization data for the testnet")
86
- cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)")
97
+ cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix for the name of per-validator subdirectories (to be number-suffixed like node0, node1, ...)")
87
98
  cmd.Flags().String(flagNodeDaemonHome, AppName, "Home directory of the node's daemon configuration")
88
99
  cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)")
89
100
  cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
package/git-revision.txt CHANGED
@@ -1 +1 @@
1
- 55a0902
1
+ 853cca5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/cosmos",
3
- "version": "0.34.2-dev-55a0902.0+55a0902",
3
+ "version": "0.34.2-dev-853cca5.0+853cca5",
4
4
  "description": "Connect JS to the Cosmos blockchain SDK",
5
5
  "parsers": {
6
6
  "js": "mjs"
@@ -38,5 +38,5 @@
38
38
  "typeCoverage": {
39
39
  "atLeast": 0
40
40
  },
41
- "gitHead": "55a09026e240a75c7ea13c4d679302b8e0238d20"
41
+ "gitHead": "853cca53c655012a47acf3dd7f48aba04f31b4dc"
42
42
  }
@@ -53,7 +53,7 @@ func GetCmdQueryParams(queryRoute string) *cobra.Command {
53
53
 
54
54
  func GetCmdGetEgress(queryRoute string) *cobra.Command {
55
55
  cmd := &cobra.Command{
56
- Use: "egress [account]",
56
+ Use: "egress <account>",
57
57
  Short: "get egress info for account",
58
58
  Args: cobra.ExactArgs(1),
59
59
  RunE: func(cmd *cobra.Command, args []string) error {
@@ -86,7 +86,7 @@ func GetCmdGetEgress(queryRoute string) *cobra.Command {
86
86
  // GetCmdMailbox queries information about a mailbox
87
87
  func GetCmdMailbox(queryRoute string) *cobra.Command {
88
88
  cmd := &cobra.Command{
89
- Use: "mailbox [peer]",
89
+ Use: "mailbox <peer>",
90
90
  Short: "get mailbox for peer",
91
91
  Args: cobra.ExactArgs(1),
92
92
  RunE: func(cmd *cobra.Command, args []string) error {
@@ -44,11 +44,18 @@ func GetTxCmd(storeKey string) *cobra.Command {
44
44
  }
45
45
 
46
46
  // GetCmdDeliver is the CLI command for sending a DeliverInbound transaction
47
+ // containing mailbox messages.
47
48
  func GetCmdDeliver() *cobra.Command {
48
49
  cmd := &cobra.Command{
49
- Use: "deliver [json string]",
50
- Short: "deliver inbound messages",
51
- Args: cobra.ExactArgs(1),
50
+ Use: "deliver {<messages JSON> | @- | @<file>}",
51
+ Short: "send mailbox messages",
52
+ Long: `send mailbox messages.
53
+ The argument indicates how to read input JSON ("@-" for standard input,
54
+ "@..." for a file path, and otherwise directly as in "deliver '[...]'").
55
+ Input must represent an array in which the first element is an array of
56
+ [messageNum: integer, messageBody: string] pairs and the second element
57
+ is an "Ack" integer.`,
58
+ Args: cobra.ExactArgs(1),
52
59
 
53
60
  RunE: func(cmd *cobra.Command, args []string) error {
54
61
  cctx, err := client.GetClientTxContext(cmd)
@@ -91,7 +98,14 @@ func GetCmdDeliver() *cobra.Command {
91
98
  // InstallBundle message in a transaction.
92
99
  func GetCmdInstallBundle() *cobra.Command {
93
100
  cmd := &cobra.Command{
94
- Use: "install-bundle <JSON>/@<FILE>/-",
101
+ Use: "install-bundle {<bundle JSON> | @- | @<file>}",
102
+ Short: "install a bundle",
103
+ Long: `install a bundle.
104
+ The argument indicates how to read input JSON ("@-" for standard input,
105
+ "@..." for a file path, and otherwise directly as in
106
+ "install-bundle '{...}'").
107
+ Input should be endoZipBase64 JSON, but this is not verified.
108
+ https://github.com/endojs/endo/tree/master/packages/bundle-source`,
95
109
  Args: cobra.ExactArgs(1),
96
110
 
97
111
  RunE: func(cmd *cobra.Command, args []string) error {
@@ -147,7 +161,7 @@ func GetCmdInstallBundle() *cobra.Command {
147
161
  // GetCmdProvision is the CLI command for sending a Provision transaction
148
162
  func GetCmdProvisionOne() *cobra.Command {
149
163
  cmd := &cobra.Command{
150
- Use: "provision-one [nickname] [address] [power-flags]",
164
+ Use: "provision-one <nickname> <address> [<power-flag>[,...]]",
151
165
  Short: "provision a single address",
152
166
  Args: cobra.RangeArgs(2, 3),
153
167
 
@@ -185,7 +199,7 @@ func GetCmdProvisionOne() *cobra.Command {
185
199
  // GetCmdWalletAction is the CLI command for sending a WalletAction or WalletSpendAction transaction
186
200
  func GetCmdWalletAction() *cobra.Command {
187
201
  cmd := &cobra.Command{
188
- Use: "wallet-action [json string]",
202
+ Use: "wallet-action <action JSON>",
189
203
  Short: "perform a wallet action",
190
204
  Args: cobra.ExactArgs(1),
191
205
  RunE: func(cmd *cobra.Command, args []string) error {
@@ -220,9 +234,11 @@ func GetCmdWalletAction() *cobra.Command {
220
234
  return cmd
221
235
  }
222
236
 
237
+ // NewCmdSubmitCoreEvalProposal is the CLI command for submitting a "CoreEval"
238
+ // governance proposal via `agd tx gov submit-proposal swingset-core-eval ...`.
223
239
  func NewCmdSubmitCoreEvalProposal() *cobra.Command {
224
240
  cmd := &cobra.Command{
225
- Use: "swingset-core-eval [[permit.json] [code.js]]...",
241
+ Use: "swingset-core-eval <permit.json code.js>...",
226
242
  Args: cobra.MinimumNArgs(2),
227
243
  Short: "Submit a proposal to evaluate code in the SwingSet core",
228
244
  Long: `Submit a SwingSet evaluate core Compartment code proposal along with an initial deposit.
@@ -28,8 +28,8 @@ func GetQueryCmd(storeKey string) *cobra.Command {
28
28
  // GetCmdGetData queries information about storage
29
29
  func GetCmdGetData(queryRoute string) *cobra.Command {
30
30
  cmd := &cobra.Command{
31
- Use: "data [path]",
32
- Short: "get vstorage data for path",
31
+ Use: "data <path>",
32
+ Short: "get data for vstorage path",
33
33
  Args: cobra.ExactArgs(1),
34
34
  RunE: func(cmd *cobra.Command, args []string) error {
35
35
  clientCtx, err := client.GetClientQueryContext(cmd)
@@ -60,8 +60,12 @@ func GetCmdGetChildren(queryRoute string) *cobra.Command {
60
60
  cmd := &cobra.Command{
61
61
  Use: "children [path]",
62
62
  Aliases: []string{"keys"},
63
- Short: "get vstorage subkey names for path",
64
- Args: cobra.MaximumNArgs(1),
63
+ Short: "get child path segments under vstorage path",
64
+ Long: `get child path segments under vstorage path.
65
+ When absent, path defaults to the empty root path.
66
+ Path segments are dot-separated, so a child "baz" under path "foo.bar" has path
67
+ "foo.bar.baz".`,
68
+ Args: cobra.MaximumNArgs(1),
65
69
  RunE: func(cmd *cobra.Command, args []string) error {
66
70
  clientCtx, err := client.GetClientQueryContext(cmd)
67
71
  if err != nil {
@@ -92,7 +96,7 @@ func GetCmdGetChildren(queryRoute string) *cobra.Command {
92
96
  // GetCmdGetPath queries vstorage data or children, depending on the path
93
97
  func GetCmdGetPath(queryRoute string) *cobra.Command {
94
98
  cmd := &cobra.Command{
95
- Use: "path [path]",
99
+ Use: "path <path>",
96
100
  Short: "get vstorage data, or children if path ends with '.'",
97
101
  Args: cobra.ExactArgs(1),
98
102
  RunE: func(cmd *cobra.Command, args []string) error {