You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[#19039](https://github.com/cosmos/cosmos-sdk/pull/19039) Add support for pubkey in autocli.
40
44
41
45
### Improvements
42
46
47
+
*[#19646](https://github.com/cosmos/cosmos-sdk/pull/19646) Use keyring from command context.
43
48
* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Upgrade SDK version due to prometheus breaking change.
44
49
* (deps) [#19810](https://github.com/cosmos/cosmos-sdk/pull/19810) Bump `cosmossdk.io/store` to v1.1.0.
45
50
*[#20083](https://github.com/cosmos/cosmos-sdk/pull/20083) Integrate latest version of cosmos-proto and improve version filtering.
46
51
*[#19618](https://github.com/cosmos/cosmos-sdk/pull/19618) Marshal enum as string in queries.
47
52
*[#19060](https://github.com/cosmos/cosmos-sdk/pull/19060) Use client context from root (or enhanced) command in autocli commands.
48
-
* Note, the given command must have a `client.Context` in its context.
53
+
* Note, the given command must have a `client.Context` in its context.
49
54
*[#19216](https://github.com/cosmos/cosmos-sdk/pull/19216) Do not overwrite TxConfig, use directly the one provided in context. TxConfig should always be set in the `client.Context` in `root.go` of an app.
50
55
*[#20266](https://github.com/cosmos/cosmos-sdk/pull/20266) Add ability to override the short description in AutoCLI-generated top-level commands.
`autocli` uses a keyring for key name resolving and signing transactions. Providing a keyring is optional, but if you want to use the `autocli` generated commands to sign transactions, you must provide a keyring.
78
+
`autocli` uses a keyring for key name resolving names and signing transactions.
79
79
80
80
:::tip
81
-
This provides a better UX as it allows to resolve key names directly from the keyring in all transactions and commands.
81
+
AutoCLI provides a better UX than normal CLI as it allows to resolve key names directly from the keyring in all transactions and commands.
82
82
83
83
```sh
84
84
<appd> q bank balances alice
@@ -87,8 +87,9 @@ This provides a better UX as it allows to resolve key names directly from the ke
87
87
88
88
:::
89
89
90
-
The keyring to be provided to `client/v2` must match the `client/v2` keyring interface.
91
-
The keyring should be provided in the `appOptions` struct as follows, and can be gotten from the client context:
90
+
The keyring used for resolving names and signing transactions is provided via the `client.Context`.
91
+
The keyring is then converted to the `client/v2/autocli/keyring` interface.
92
+
If no keyring is provided, the `autocli` generated command will not be able to sign transactions, but will still be able to query the chain.
92
93
93
94
:::tip
94
95
The Cosmos SDK keyring and Hubl keyring both implement the `client/v2/autocli/keyring` interface, thanks to the following wrapper:
@@ -99,18 +100,6 @@ keyring.NewAutoCLIKeyring(kb)
99
100
100
101
:::
101
102
102
-
:::warning
103
-
When using AutoCLI the keyring will only be created once and before any command flag parsing.
104
-
:::
105
-
106
-
```go
107
-
// Set the keyring in the appOptions
108
-
appOptions.Keyring = keyring
109
-
110
-
err:= autoCliOpts.EnhanceRootCommand(rootCmd)
111
-
...
112
-
```
113
-
114
103
## Signing
115
104
116
105
`autocli` supports signing transactions with the keyring.
0 commit comments