Skip to content

Commit d3975b8

Browse files
Merge pull request ipfs/interface-go-ipfs-core#5339 from ipfs/refactor/coreapi/key
key cmd: Refactor to use coreapi This commit was moved from ipfs/interface-go-ipfs-core@f6916c4
2 parents 84d04f8 + 55223e9 commit d3975b8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

coreiface/key.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ import (
44
"context"
55

66
options "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
7+
8+
"gx/ipfs/QmdVrMn1LhB4ybb8hMVaMLXnA8XRSewMnK6YqXKXoTcRvN/go-libp2p-peer"
79
)
810

911
// Key specifies the interface to Keys in KeyAPI Keystore
1012
type Key interface {
1113
// Key returns key name
1214
Name() string
15+
1316
// Path returns key path
1417
Path() Path
18+
19+
// ID returns key PeerID
20+
ID() peer.ID
1521
}
1622

1723
// KeyAPI specifies the interface to Keystore
@@ -28,5 +34,5 @@ type KeyAPI interface {
2834
List(ctx context.Context) ([]Key, error)
2935

3036
// Remove removes keys from keystore. Returns ipns path of the removed key
31-
Remove(ctx context.Context, name string) (Path, error)
37+
Remove(ctx context.Context, name string) (Key, error)
3238
}

0 commit comments

Comments
 (0)