Documentation
¶
Index ¶
- func CreateInterfaceRegistryWithEVMSupport() codectypes.InterfaceRegistry
- func CreateKeyring(homeDir string, reader io.Reader, keyringBackend KeyringBackend) (keyring.Keyring, error)
- func CreateKeyringFromConfig(homeDir string, reader io.Reader, configBackend config.KeyringBackend) (keyring.Keyring, error)
- func CreateNewKey(kr keyring.Keyring, name string, mnemonic string, passphrase string) (*keyring.Record, string, error)
- func GetKeyringKeybase(cfg KeyringConfig) (keyring.Keyring, string, error)
- func ValidateKeyExists(kr keyring.Keyring, keyName string) error
- type KeyringBackend
- type KeyringConfig
- type Keys
- type UniversalValidatorKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInterfaceRegistryWithEVMSupport ¶
func CreateInterfaceRegistryWithEVMSupport() codectypes.InterfaceRegistry
CreateInterfaceRegistryWithEVMSupport creates an interface registry with EVM-compatible key types
func CreateKeyring ¶
func CreateKeyring(homeDir string, reader io.Reader, keyringBackend KeyringBackend) (keyring.Keyring, error)
CreateKeyring creates a keyring with EVM compatibility
func CreateKeyringFromConfig ¶
func CreateKeyringFromConfig(homeDir string, reader io.Reader, configBackend config.KeyringBackend) (keyring.Keyring, error)
CreateKeyringFromConfig creates a keyring with EVM compatibility from config backend type
func CreateNewKey ¶
func CreateNewKey(kr keyring.Keyring, name string, mnemonic string, passphrase string) (*keyring.Record, string, error)
CreateNewKey creates a new key in the keyring and returns the record and mnemonic. If mnemonic is provided, it imports the key; otherwise, it generates a new one. The returned mnemonic will be empty if importing from an existing mnemonic.
func GetKeyringKeybase ¶
func GetKeyringKeybase(cfg KeyringConfig) (keyring.Keyring, string, error)
GetKeyringKeybase creates and returns keyring and key info
Types ¶
type KeyringBackend ¶
type KeyringBackend string
KeyringBackend represents the type of keyring backend to use
const ( // KeyringBackendTest is the test Cosmos keyring backend (unencrypted) KeyringBackendTest KeyringBackend = "test" // KeyringBackendFile is the file Cosmos keyring backend (encrypted) KeyringBackendFile KeyringBackend = "file" )
type KeyringConfig ¶
type KeyringConfig struct {
HomeDir string
KeyringBackend KeyringBackend
HotkeyName string
HotkeyPassword string
}
KeyringConfig holds configuration for keyring initialization
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Keys manages all the keys used by Universal Validator
func (*Keys) GetAddress ¶
func (k *Keys) GetAddress() (sdk.AccAddress, error)
GetAddress returns the hot key address
func (*Keys) GetKeyName ¶
GetKeyName returns the name of the hot key in the keyring
type UniversalValidatorKeys ¶
type UniversalValidatorKeys interface {
// GetAddress returns the hot key address
GetAddress() (sdk.AccAddress, error)
// GetKeyName returns the name of the hot key in the keyring
GetKeyName() string
// GetKeyring returns the underlying keyring for signing operations.
// It validates that the key exists before returning the keyring.
// For file backend, decryption happens automatically when signing via tx.Sign().
// This allows signing without exposing the private key.
GetKeyring() (keyring.Keyring, error)
}
UniversalValidatorKeys defines the interface for key management in Universal Validator