diff --git a/CHANGELOG.md b/CHANGELOG.md index bb86c24d7c1a..fe5c8be2ea67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 554ff61e43a7..beab8f874532 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -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) @@ -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 {