Documentation ¶
Index ¶
- Variables
- func AcceptablePassphrase(passphrase string) bool
- func BLSID(id uint64) *bls.ID
- func ConnectToBeaconNode(ctx context.Context, address string, timeout time.Duration, allowInsecure bool) (eth2client.Service, error)
- func GetBaseDir() string
- func GetOptionalPassphrase() (string, error)
- func GetPassphrase() (string, error)
- func GetPassphrases() []string
- func GetStorePassphrase() string
- func GetWalletPassphrase() string
- func InitLogging() error
- func LockAccount(ctx context.Context, account e2wtypes.Account) error
- func Network(ctx context.Context, eth2Client eth2client.Service) (string, error)
- func UnlockAccount(ctx context.Context, account e2wtypes.Account, passphrases []string) (bool, error)
- type DepositInfo
- type ScratchAccount
- func (a *ScratchAccount) ID() uuid.UUID
- func (a *ScratchAccount) IsUnlocked(ctx context.Context) (bool, error)
- func (a *ScratchAccount) Lock(ctx context.Context) error
- func (a *ScratchAccount) Name() string
- func (a *ScratchAccount) Path() string
- func (a *ScratchAccount) PublicKey() e2types.PublicKey
- func (a *ScratchAccount) Sign(ctx context.Context, data []byte) (e2types.Signature, error)
- func (a *ScratchAccount) Unlock(ctx context.Context, passphrase []byte) error
- type ValidatorExitData
Constants ¶
This section is empty.
Variables ¶
var Log zerolog.Logger
Log is the ethdo global logger.
Functions ¶
func AcceptablePassphrase ¶ added in v1.7.0
AcceptablePassphrase returns true if the passphrase is acceptable.
func ConnectToBeaconNode ¶ added in v1.7.0
func ConnectToBeaconNode(ctx context.Context, address string, timeout time.Duration, allowInsecure bool) (eth2client.Service, error)
ConnectToBeaconNode connects to a beacon node at the given address.
func GetBaseDir ¶ added in v1.7.0
func GetBaseDir() string
GetBaseDir fetches the base directory for wallets.
func GetOptionalPassphrase ¶ added in v1.7.0
GetOptionalPassphrase fetches the passphrase if supplied by the user.
func GetPassphrase ¶ added in v1.7.0
GetPassphrase fetches the passphrase supplied by the user.
func GetPassphrases ¶ added in v1.7.0
func GetPassphrases() []string
GetPassphrases fetches the passphrases supplied by the user.
func GetStorePassphrase ¶ added in v1.7.0
func GetStorePassphrase() string
GetStorePassphrase fetches the store passphrase supplied by the user.
func GetWalletPassphrase ¶ added in v1.7.0
func GetWalletPassphrase() string
GetWalletPassphrase fetches the wallet passphrase supplied by the user.
func LockAccount ¶ added in v1.7.0
LockAccount attempts to lock an account.
Types ¶
type DepositInfo ¶ added in v1.5.8
type DepositInfo struct { Name string Account string PublicKey []byte WithdrawalCredentials []byte Signature []byte DepositDataRoot []byte DepositMessageRoot []byte ForkVersion []byte Amount uint64 Version uint64 }
DepositInfo is a generic deposit structure.
func DepositInfoFromJSON ¶ added in v1.5.8
func DepositInfoFromJSON(input []byte) ([]*DepositInfo, error)
DepositInfoFromJSON obtains deposit info from various possibly formx of JSON.
type ScratchAccount ¶
type ScratchAccount struct {
// contains filtered or unexported fields
}
ScratchAccount is an account that exists temporarily.
func NewScratchAccount ¶
func NewScratchAccount(privKey []byte, pubKey []byte) (*ScratchAccount, error)
NewScratchAccount creates a new local account.
func (*ScratchAccount) IsUnlocked ¶
func (a *ScratchAccount) IsUnlocked(ctx context.Context) (bool, error)
IsUnlocked returns true if the account is unlocked.
func (*ScratchAccount) Lock ¶
func (a *ScratchAccount) Lock(ctx context.Context) error
Lock locks the account.
func (*ScratchAccount) PublicKey ¶
func (a *ScratchAccount) PublicKey() e2types.PublicKey
PublicKey returns the account public key.
type ValidatorExitData ¶ added in v1.7.0
type ValidatorExitData struct { Data *spec.SignedVoluntaryExit ForkVersion spec.Version }
ValidatorExitData contains data for a validator exit.
func (*ValidatorExitData) MarshalJSON ¶ added in v1.7.0
func (d *ValidatorExitData) MarshalJSON() ([]byte, error)
MarshalJSON implements custom JSON marshaller.
func (*ValidatorExitData) UnmarshalJSON ¶ added in v1.7.0
func (d *ValidatorExitData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom JSON unmarshaller.