Documentation
¶
Overview ¶
Package keyring provides multi-keyring management for akt.
It wraps the Cosmos SDK's crypto/keyring package, adding support for multiple named keyrings that can be shared across contexts.
Each named keyring maps to a Cosmos SDK keyring.Keyring instance backed by a specific backend (os, file, test, kwallet, pass) and directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAlgo ¶
func DefaultAlgo() sdkkeyring.SignatureAlgo
DefaultAlgo returns the default signing algorithm (secp256k1).
func NewInMemory ¶
func NewInMemory(cdc codec.Codec) sdkkeyring.Keyring
NewInMemory creates an in-memory keyring for dry-run / testing use. It is not associated with any named keyring in the config.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages multiple named keyrings. It lazily opens keyrings on first access and caches them for the lifetime of the process. Manager is safe for concurrent use.
func NewManager ¶
NewManager creates a keyring manager from the config root and keyring definitions. The codec is required by the Cosmos SDK keyring for protobuf key serialization.
func (*Manager) Get ¶
func (m *Manager) Get(name string) (sdkkeyring.Keyring, error)
Get returns the Cosmos SDK keyring for the given named keyring. The keyring is lazily opened on first access and cached.