keys

package
v0.0.0-...-2da98db Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBech32ifyPubKey is an error when Bech32ifyPubKey fails
	ErrBech32ifyPubKey = errors.New("Bech32ifyPubKey fail in main")

	// ErrNewPubKey is an error when NewPubKey fails
	ErrNewPubKey = errors.New("NewPubKey error from string")
)

Functions

func GetGranteeKeyName

func GetGranteeKeyName(signerName string) string

GetGranteeKeyName return the grantee name

func GetKeyringKeybase

func GetKeyringKeybase(cfg config.Config, hotkeyPassword string) (ckeys.Keyring, string, error)

GetKeyringKeybase return keyring and key info

Types

type Keys

type Keys struct {
	OperatorAddress sdk.AccAddress
	// contains filtered or unexported fields
}

Keys manages all the keys used by zeta client

func NewKeysWithKeybase

func NewKeysWithKeybase(
	kb ckeys.Keyring,
	granterAddress sdk.AccAddress,
	granteeName string,
	hotkeyPassword string,
) *Keys

NewKeysWithKeybase create a new instance of Keys

func (*Keys) GetAddress

func (k *Keys) GetAddress() (sdk.AccAddress, error)

GetAddress return the signer address

func (*Keys) GetHotkeyPassword

func (k *Keys) GetHotkeyPassword() string

GetHotkeyPassword returns the password to be used returns empty if no password is needed

func (*Keys) GetKeybase

func (k *Keys) GetKeybase() ckeys.Keyring

GetKeybase return the keybase

func (*Keys) GetOperatorAddress

func (k *Keys) GetOperatorAddress() sdk.AccAddress

GetOperatorAddress return the operator address

func (*Keys) GetPrivateKey

func (k *Keys) GetPrivateKey(password string) (cryptotypes.PrivKey, error)

GetPrivateKey return the private key

func (*Keys) GetPubKeySet

func (k *Keys) GetPubKeySet(password string) (zetacrypto.PubKeySet, error)

func (*Keys) GetSignerInfo

func (k *Keys) GetSignerInfo() *ckeys.Record

GetSignerInfo return signer info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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