Skip to content

Commit

Permalink
feat: expose db keyring used in the keystore (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Jun 3, 2024
1 parent 0108877 commit 8d30134
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#248](https://github.com/crypto-org-chain/cosmos-sdk/pull/248) Init btree store lazily to save allocations when no content insert into it.
* [#252](https://github.com/crypto-org-chain/cosmos-sdk/pull/252) Add `BlockGasWanted` to `Context` to support feemarket module.
* [#269](https://github.com/crypto-org-chain/cosmos-sdk/pull/269) Add `StreamingManager` to baseapp to extend the abci listeners.
* (crypto/keyring) [#20212](https://github.com/cosmos/cosmos-sdk/pull/20212) Expose the db keyring used in the keystore.

### Improvements

Expand Down
9 changes: 9 additions & 0 deletions crypto/keyring/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ var (
type Keyring interface {
// Get the backend type used in the keyring config: "file", "os", "kwallet", "pass", "test", "memory".
Backend() string

// Get the db keyring used in the keystore.
DB() keyring.Keyring

// List all keys.
List() ([]*Record, error)

Expand Down Expand Up @@ -256,6 +260,11 @@ func (ks keystore) Backend() string {
return ks.backend
}

// DB returns the db keyring used in the keystore
func (ks keystore) DB() keyring.Keyring {
return ks.db
}

func (ks keystore) ExportPubKeyArmor(uid string) (string, error) {
k, err := ks.Key(uid)
if err != nil {
Expand Down

0 comments on commit 8d30134

Please sign in to comment.