Documentation
¶
Index ¶
- Variables
- type ConstellationManager
- type IConstellationConfigProvider
- type IConstellationManagerProvider
- type IConstellationRequirementsProvider
- type IConstellationServiceProvider
- type IConstellationWalletProvider
- type ISmartNodeServiceProvider
- type RocketPoolManager
- type ValidatorKey
- type Wallet
- func (w *Wallet) GetNextValidatorKey() (*ValidatorKey, error)
- func (w *Wallet) LoadValidatorKey(pubkey beacon.ValidatorPubkey) (*eth2types.BLSPrivateKey, error)
- func (w *Wallet) RecoverValidatorKey(pubkey beacon.ValidatorPubkey, startIndex uint64, maxAttempts uint64) (uint64, error)
- func (w *Wallet) Reload() error
- func (w *Wallet) SaveValidatorKey(key *ValidatorKey) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotRegisteredWithConstellation error = errors.New("The node is not registered with Constellation yet.")
)
Functions ¶
This section is empty.
Types ¶
type ConstellationManager ¶
type ConstellationManager struct {
Directory *constellation.Directory
Whitelist *constellation.Whitelist
SuperNodeAccount *constellation.SuperNodeAccount
PriceFetcher *constellation.PriceFetcher
OperatorDistributor *constellation.OperatorDistributor
WethVault *constellation.WethVault
RplVault *constellation.RplVault
PoAConstellationOracle *constellation.PoAConstellationOracle
Treasury *constellation.Treasury
MerkleClaimStreamer *constellation.MerkleClaimStreamer
// contains filtered or unexported fields
}
Manager for Constellation contract bindings
func NewConstellationManager ¶
func NewConstellationManager(res *csconfig.ConstellationResources, ec eth.IExecutionClient, qMgr *eth.QueryManager, txMgr *eth.TransactionManager) (*ConstellationManager, error)
Creates a new ConstellationManager instance
func (*ConstellationManager) LoadContracts ¶
func (m *ConstellationManager) LoadContracts() error
Checks if the contract addresses have been loaded yet, and if not, generates the bindings with the on-chain addresses. Requires a synced EC to function properly; you're responsible for ensuring it's synced before calling this.
type IConstellationConfigProvider ¶
type IConstellationConfigProvider interface {
// Gets the Constellation config
GetConfig() *csconfig.ConstellationConfig
// Gets the Constellation resources
GetResources() *csconfig.MergedResources
}
Provides the Constellation module config and resources
type IConstellationManagerProvider ¶
type IConstellationManagerProvider interface {
// Gets the Constellation manager
GetConstellationManager() *ConstellationManager
}
Provides the Constellation manager
type IConstellationRequirementsProvider ¶
type IConstellationRequirementsProvider interface {
// Requires either the node address or the wallet address to be registered with Constellation.
// If useWalletAddress is true, the wallet address will be used to check registration. If false, the node address will be used.
// Errors include:
// - services.ErrNodeAddressNotSet
// - services.ErrNeedPassword
// - services.ErrWalletLoadFailure
// - services.ErrNoWallet
// - services.ErrWalletMismatch
// - services.ErrExecutionClientNotSynced
// - ErrNotRegisteredWithConstellation
RequireRegisteredWithConstellation(ctx context.Context, walletStatus wallet.WalletStatus, useWalletAddress bool) error
}
Provides the requirements for the Constellation daemon
type IConstellationServiceProvider ¶
type IConstellationServiceProvider interface {
IConstellationConfigProvider
IConstellationManagerProvider
IConstellationRequirementsProvider
IConstellationWalletProvider
ISmartNodeServiceProvider
services.IModuleServiceProvider
}
Provides all services for the Constellation daemon
func NewConstellationServiceProvider ¶
func NewConstellationServiceProvider(sp services.IModuleServiceProvider, settingsList []*csconfig.ConstellationSettings) (IConstellationServiceProvider, error)
Create a new service provider with Constellation daemon-specific features
func NewConstellationServiceProviderFromCustomServices ¶
func NewConstellationServiceProviderFromCustomServices(sp services.IModuleServiceProvider, cfg *csconfig.ConstellationConfig, csresources *csconfig.MergedResources) (IConstellationServiceProvider, error)
Create a new service provider with Constellation daemon-specific features, using custom services instead of loading them from the module service provider.
type IConstellationWalletProvider ¶
type IConstellationWalletProvider interface {
// Gets the wallet
GetWallet() *Wallet
}
Provides the Constellation daemon wallet
type ISmartNodeServiceProvider ¶
type ISmartNodeServiceProvider interface {
// Gets the Rocket Pool manager
GetRocketPoolManager() *RocketPoolManager
// Gets the Smart Node service provider
GetSmartNodeServiceProvider() snservices.ISmartNodeServiceProvider
}
Provides the services used for Rocket Pool and Smart Node interaction
type RocketPoolManager ¶
type RocketPoolManager struct {
RocketPool *rocketpool.RocketPool
// contains filtered or unexported fields
}
Manager for the Rocket Pool binding
func NewRocketPoolManager ¶
func NewRocketPoolManager(res *csconfig.MergedResources, ec eth.IExecutionClient, qMgr *eth.QueryManager, txMgr *eth.TransactionManager) (*RocketPoolManager, error)
Creates a new RocketPoolManager instance
func (*RocketPoolManager) RefreshRocketPoolContracts ¶
func (m *RocketPoolManager) RefreshRocketPoolContracts() error
Refresh the Rocket Pool contracts if they've been updated since they were last loaded. Requires a synced EC to function properly; you're responsible for ensuring it's synced before calling this.
type ValidatorKey ¶
type ValidatorKey struct {
PublicKey beacon.ValidatorPubkey
PrivateKey *eth2types.BLSPrivateKey
DerivationPath string
WalletIndex uint64
}
A validator private/public key pair
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet manager for the Constellation daemon
func NewWallet ¶
func NewWallet(sp services.IModuleServiceProvider) (*Wallet, error)
Create a new wallet
func (*Wallet) GetNextValidatorKey ¶
func (w *Wallet) GetNextValidatorKey() (*ValidatorKey, error)
Get the next validator key without saving it. You are responsible for saving it before using it for actual validation duties.
func (*Wallet) LoadValidatorKey ¶
func (w *Wallet) LoadValidatorKey(pubkey beacon.ValidatorPubkey) (*eth2types.BLSPrivateKey, error)
Get the private validator key with the corresponding pubkey
func (*Wallet) RecoverValidatorKey ¶
func (w *Wallet) RecoverValidatorKey(pubkey beacon.ValidatorPubkey, startIndex uint64, maxAttempts uint64) (uint64, error)
Recover a validator key by public key
func (*Wallet) SaveValidatorKey ¶
func (w *Wallet) SaveValidatorKey(key *ValidatorKey) error
Save a validator key