diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b22e6b3e4..8122c23b472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (x/consensus) [#19483](https://github.com/cosmos/cosmos-sdk/pull/19483) Add consensus messages registration to consensus module. * (types) [#19759](https://github.com/cosmos/cosmos-sdk/pull/19759) Align SignerExtractionAdapter in PriorityNonceMempool Remove. * (client) [#19870](https://github.com/cosmos/cosmos-sdk/pull/19870) Add new query command `wait-tx`. Alias `event-query-tx-for` to `wait-tx` for backward compatibility. +* (crypto/keyring) [#20212](https://github.com/cosmos/cosmos-sdk/pull/20212) Expose the db keyring used in the keystore. * (genutil) [#19971](https://github.com/cosmos/cosmos-sdk/pull/19971) Allow manually setting the consensus key type in genesis ### Improvements diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index d5392821404..c125383d543 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -58,6 +58,10 @@ var ( type Keyring interface { // Backend 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 {