Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/rpc/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (api *KeyAPI) List(ctx context.Context) ([]iface.Key, error) {
var out struct {
Keys []keyOutput
}
if err := api.core().Request("key/list").Exec(ctx, &out); err != nil {
if err := api.core().Request("key/ls").Exec(ctx, &out); err != nil {
return nil, err
}

Expand Down
1 change: 1 addition & 0 deletions core/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func TestCommands(t *testing.T) {
"/key/gen",
"/key/import",
"/key/list",
"/key/ls",
"/key/rename",
"/key/rm",
"/key/rotate",
Expand Down
20 changes: 16 additions & 4 deletions core/commands/keystore.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ publish'.
> ipfs key gen --type=rsa --size=2048 mykey
> ipfs name publish --key=mykey QmSomeHash

'ipfs key list' lists the available keys.
'ipfs key ls' lists the available keys.

> ipfs key list
> ipfs key ls
self
mykey
`,
Expand All @@ -49,7 +49,8 @@ publish'.
"gen": keyGenCmd,
"export": keyExportCmd,
"import": keyImportCmd,
"list": keyListCmd,
"list": keyListDeprecatedCmd,
"ls": keyListCmd,
"rename": keyRenameCmd,
"rm": keyRmCmd,
"rotate": keyRotateCmd,
Expand Down Expand Up @@ -488,6 +489,17 @@ var keyListCmd = &cmds.Command{
Type: KeyOutputList{},
}

var keyListDeprecatedCmd = &cmds.Command{
Status: cmds.Deprecated,
Helptext: cmds.HelpText{
Tagline: "Deprecated: use 'ipfs key ls' instead.",
},
Options: keyListCmd.Options,
Run: keyListCmd.Run,
Encoders: keyListCmd.Encoders,
Type: keyListCmd.Type,
}

const (
keyStoreForceOptionName = "force"
)
Expand Down Expand Up @@ -773,7 +785,7 @@ the signed payload is always prefixed with "libp2p-key signed message:".
`,
},
Options: []cmds.Option{
cmds.StringOption("key", "k", "The name of the key to use for signing."),
cmds.StringOption("key", "k", "The name of the key to use for verifying."),
cmds.StringOption("signature", "s", "Multibase-encoded signature to verify."),
ke.OptionIPNSBase,
},
Expand Down
8 changes: 5 additions & 3 deletions docs/changelogs/v0.40.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This release was brought to you by the [Shipyard](https://ipshipyard.com/) team.
- [New `ipfs diag datastore` commands](#new-ipfs-diag-datastore-commands)
- [🚇 Improved `ipfs p2p` tunnels with foreground mode](#-improved-ipfs-p2p-tunnels-with-foreground-mode)
- [Improved `ipfs dag stat` output](#improved-ipfs-dag-stat-output)
- [Skip bad keys when listing](#skip_bad_keys_when_listing)
- [🔑 `ipfs key` improvements](#-ipfs-key-improvements)
- [Accelerated DHT Client and Provide Sweep now work together](#accelerated-dht-client-and-provide-sweep-now-work-together)
- [⏱️ Configurable gateway request duration limit](#️-configurable-gateway-request-duration-limit)
- [🔧 Recovery from corrupted MFS root](#-recovery-from-corrupted-mfs-root)
Expand Down Expand Up @@ -110,9 +110,11 @@ Ratio: 1.500000

Use `--progress=true` to force progress even when piped, or `--progress=false` to disable it.

#### Skip bad keys when listing
#### 🔑 `ipfs key` improvements

Change the `ipfs key list` behavior to log an error and continue listing keys when a key cannot be read from the keystore or decoded.
`ipfs key ls` is now the canonical command for listing keys, matching `ipfs pin ls` and `ipfs files ls`. The old `ipfs key list` still works but is deprecated.

Listing also became more resilient: bad keys are now skipped with an error log instead of failing the entire operation.

#### Accelerated DHT Client and Provide Sweep now work together

Expand Down
Loading