feat(crypto/keyring): expose db keyring used in the keystore (#20212)
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
parent
990f415eeb
commit
c4308d2da0
@ -59,6 +59,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
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user