Documentation ¶
Index ¶
- Variables
- func GetGranteeKeyName(signerName string) string
- func GetKeyringKeybase(cfg config.Config, hotkeyPassword string) (ckeys.Keyring, string, error)
- func IsRelayerPrivateKeyValid(privateKey string, network chains.Network) bool
- func ResolveRelayerKeyFile(relayerKeyPath string, network chains.Network) (string, error)
- func WriteRelayerKeyToFile(fileName string, relayerKey RelayerKey) error
- type Keys
- func (k *Keys) GetAddress() (sdk.AccAddress, error)
- func (k *Keys) GetHotkeyPassword() string
- func (k *Keys) GetKeybase() ckeys.Keyring
- func (k *Keys) GetOperatorAddress() sdk.AccAddress
- func (k *Keys) GetPrivateKey(password string) (cryptotypes.PrivKey, error)
- func (k *Keys) GetPubKeySet(password string) (zetacrypto.PubKeySet, error)
- func (k *Keys) GetSignerInfo() *ckeys.Record
- type RelayerKey
Constants ¶
This section is empty.
Variables ¶
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 ¶
GetGranteeKeyName return the grantee name
func GetKeyringKeybase ¶
GetKeyringKeybase return keyring and key info
func IsRelayerPrivateKeyValid ¶
IsRelayerPrivateKeyValid checks if the given private key is valid for the given network
func ResolveRelayerKeyFile ¶
ResolveRelayerKeyFile is a helper function to resolve the relayer key file with full path
func WriteRelayerKeyToFile ¶
func WriteRelayerKeyToFile(fileName string, relayerKey RelayerKey) error
WriteRelayerKeyToFile writes the relayer key to a file
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 ¶
GetHotkeyPassword returns the password to be used returns empty if no password is needed
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 ¶
GetSignerInfo return signer info
type RelayerKey ¶
type RelayerKey struct {
PrivateKey string `json:"private_key"`
}
RelayerKey is the structure that holds the relayer private key
func LoadRelayerKey ¶
func LoadRelayerKey(relayerKeyPath string, network chains.Network, password string) (*RelayerKey, error)
LoadRelayerKey loads the relayer key for given network and password
func ReadRelayerKeyFromFile ¶
func ReadRelayerKeyFromFile(fileName string) (*RelayerKey, error)
ReadRelayerKeyFromFile reads the relayer key file and returns the key
func (RelayerKey) ResolveAddress ¶
ResolveAddress returns the network name and address of the relayer key