services

package
v0.4.2-dev Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 19 Imported by: 2

Documentation

Index

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

func CheckIfWalletReady

func CheckIfWalletReady(status wallet.WalletStatus) error

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(status wallet.WalletStatus) error

func (*ServiceProvider) RequireWalletReady

func (sp *ServiceProvider) RequireWalletReady(status wallet.WalletStatus) 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

Jump to

Keyboard shortcuts

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