Documentation ¶
Index ¶
- Constants
- type ModuleSigner
- type ServiceProvider
- func (p *ServiceProvider) CancelContextOnShutdown()
- func (p *ServiceProvider) Close()
- func (p *ServiceProvider) GetApiLogger() *log.Logger
- func (p *ServiceProvider) GetBaseContext() context.Context
- func (p *ServiceProvider) GetBeaconClient() *services.BeaconClientManager
- func (p *ServiceProvider) GetClientLogger() *log.Logger
- func (p *ServiceProvider) GetEthClient() *services.ExecutionClientManager
- func (p *ServiceProvider) GetHyperdriveClient() *client.ApiClient
- func (p *ServiceProvider) GetHyperdriveConfig() *hdconfig.HyperdriveConfig
- func (p *ServiceProvider) GetModuleConfig() hdconfig.IModuleConfig
- func (p *ServiceProvider) GetModuleDir() string
- func (p *ServiceProvider) GetQueryManager() *eth.QueryManager
- func (p *ServiceProvider) GetResources() *config.NetworkResources
- func (p *ServiceProvider) GetSigner() *ModuleSigner
- func (p *ServiceProvider) GetTasksLogger() *log.Logger
- func (p *ServiceProvider) GetTransactionManager() *eth.TransactionManager
- func (p *ServiceProvider) GetUserDir() string
- func (sp *ServiceProvider) RequireBeaconClientSynced(ctx context.Context) error
- func (sp *ServiceProvider) RequireEthClientSynced(ctx context.Context) error
- func (sp *ServiceProvider) RequireNodeAddress() error
- func (sp *ServiceProvider) RequireWalletReady() error
- func (sp *ServiceProvider) WaitBeaconClientSynced(ctx context.Context, verbose bool) error
- func (sp *ServiceProvider) WaitEthClientSynced(ctx context.Context, verbose bool) error
Constants ¶
View Source
const ( // Log keys PrimarySyncProgressKey string = "primarySyncProgress" FallbackSyncProgressKey string = "fallbackSyncProgress" SyncProgressKey string = "syncProgress" PrimaryErrorKey string = "primaryError" FallbackErrorKey string = "fallbackError" EthClientSyncTimeout int64 = 8 // 8 seconds BeaconClientSyncTimeout int64 = 8 // 8 seconds )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModuleSigner ¶
type ModuleSigner struct {
// contains filtered or unexported fields
}
Used to request TX signatures from the node wallet
func NewModuleSigner ¶
func NewModuleSigner(hd *client.ApiClient) *ModuleSigner
Creates a new ModuleSigner
func (*ModuleSigner) GetTransactor ¶
func (s *ModuleSigner) GetTransactor(walletAddress common.Address) *bind.TransactOpts
Gets a transactor for signing transactions
type ServiceProvider ¶
type ServiceProvider struct {
// contains filtered or unexported fields
}
A container for all of the various services used by Hyperdrive
func NewServiceProvider ¶
func NewServiceProvider[ConfigType hdconfig.IModuleConfig](moduleDir string, moduleName string, clientLogName string, factory func(*hdconfig.HyperdriveConfig) ConfigType, clientTimeout time.Duration) (*ServiceProvider, error)
Creates a new ServiceProvider instance
func (*ServiceProvider) CancelContextOnShutdown ¶
func (p *ServiceProvider) CancelContextOnShutdown()
func (*ServiceProvider) Close ¶
func (p *ServiceProvider) Close()
Closes the service provider and its underlying services
func (*ServiceProvider) GetApiLogger ¶
func (p *ServiceProvider) GetApiLogger() *log.Logger
func (*ServiceProvider) GetBaseContext ¶
func (p *ServiceProvider) GetBaseContext() context.Context
func (*ServiceProvider) GetBeaconClient ¶
func (p *ServiceProvider) GetBeaconClient() *services.BeaconClientManager
func (*ServiceProvider) GetClientLogger ¶
func (p *ServiceProvider) GetClientLogger() *log.Logger
func (*ServiceProvider) GetEthClient ¶
func (p *ServiceProvider) GetEthClient() *services.ExecutionClientManager
func (*ServiceProvider) GetHyperdriveClient ¶
func (p *ServiceProvider) GetHyperdriveClient() *client.ApiClient
func (*ServiceProvider) GetHyperdriveConfig ¶
func (p *ServiceProvider) GetHyperdriveConfig() *hdconfig.HyperdriveConfig
func (*ServiceProvider) GetModuleConfig ¶
func (p *ServiceProvider) GetModuleConfig() hdconfig.IModuleConfig
func (*ServiceProvider) GetModuleDir ¶
func (p *ServiceProvider) GetModuleDir() string
func (*ServiceProvider) GetQueryManager ¶
func (p *ServiceProvider) GetQueryManager() *eth.QueryManager
func (*ServiceProvider) GetResources ¶
func (p *ServiceProvider) GetResources() *config.NetworkResources
func (*ServiceProvider) GetSigner ¶
func (p *ServiceProvider) GetSigner() *ModuleSigner
func (*ServiceProvider) GetTasksLogger ¶
func (p *ServiceProvider) GetTasksLogger() *log.Logger
func (*ServiceProvider) GetTransactionManager ¶
func (p *ServiceProvider) GetTransactionManager() *eth.TransactionManager
func (*ServiceProvider) GetUserDir ¶
func (p *ServiceProvider) GetUserDir() string
func (*ServiceProvider) RequireBeaconClientSynced ¶
func (sp *ServiceProvider) RequireBeaconClientSynced(ctx context.Context) error
func (*ServiceProvider) RequireEthClientSynced ¶
func (sp *ServiceProvider) RequireEthClientSynced(ctx context.Context) error
func (*ServiceProvider) RequireNodeAddress ¶
func (sp *ServiceProvider) RequireNodeAddress() error
func (*ServiceProvider) RequireWalletReady ¶
func (sp *ServiceProvider) RequireWalletReady() error
func (*ServiceProvider) WaitBeaconClientSynced ¶
func (sp *ServiceProvider) WaitBeaconClientSynced(ctx context.Context, verbose bool) error
Wait for the Beacon client to sync; timeout of 0 indicates no timeout
func (*ServiceProvider) WaitEthClientSynced ¶
func (sp *ServiceProvider) WaitEthClientSynced(ctx context.Context, verbose bool) error
Wait for the Executon client to sync; timeout of 0 indicates no timeout
Click to show internal directories.
Click to hide internal directories.