keyring

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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

func NewManager(root string, keyrings []aktctx.Keyring, cdc codec.Codec) *Manager

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.

func (*Manager) Names

func (m *Manager) Names() []string

Names returns the names of all configured keyrings.

func (*Manager) Reload

func (m *Manager) Reload(keyrings []aktctx.Keyring)

Reload updates the keyring configurations (e.g., after config live-reload). Cached keyrings whose config changed are evicted.

func (*Manager) SetInput

func (m *Manager) SetInput(r io.Reader)

SetInput overrides the reader used for password prompts. Primarily for testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL