solana

package
v2.5.1-clf-20230831 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRequestTimeout = 30 * time.Second

DefaultRequestTimeout is the default Solana client timeout.

Variables

This section is empty.

Functions

func NewChain added in v2.6.0

func NewChain(cfg *SolanaConfig, opts ChainOpts) (solana.Chain, error)

Types

type ChainOpts added in v2.6.0

type ChainOpts struct {
	Logger   logger.Logger
	KeyStore loop.Keystore
	Configs  Configs
}

ChainOpts holds options for configuring a Chain.

func (*ChainOpts) ConfigsAndLogger

func (o *ChainOpts) ConfigsAndLogger() (chains.Configs[string, db.Node], logger.Logger)

func (*ChainOpts) Validate added in v2.6.0

func (o *ChainOpts) Validate() (err error)

type Configs

type Configs interface {
	chains.ChainConfigs
	chains.NodeConfigs[string, soldb.Node]
}

Configs manages solana chains and nodes.

func NewConfigs

func NewConfigs(cfgs chains.ConfigsV2[string, soldb.Node]) Configs

type RelayExtender

type RelayExtender struct {
	solana.Chain
	// contains filtered or unexported fields
}

TODO remove these wrappers after BCF-2441

func NewRelayExtender

func NewRelayExtender(cfg *SolanaConfig, opts ChainOpts) (*RelayExtender, error)

func (*RelayExtender) GetChainStatus

func (r *RelayExtender) GetChainStatus(ctx context.Context) (relaytypes.ChainStatus, error)

func (*RelayExtender) ListNodeStatuses

func (r *RelayExtender) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []relaytypes.NodeStatus, nextPageToken string, total int, err error)

func (*RelayExtender) Transact

func (r *RelayExtender) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error

type SolanaConfig

type SolanaConfig struct {
	ChainID *string
	// Do not access directly, use [IsEnabled]
	Enabled *bool
	solcfg.Chain
	Nodes SolanaNodes
}

func (*SolanaConfig) BalancePollPeriod

func (c *SolanaConfig) BalancePollPeriod() time.Duration

func (*SolanaConfig) Commitment

func (c *SolanaConfig) Commitment() rpc.CommitmentType

func (*SolanaConfig) ComputeUnitPriceDefault

func (c *SolanaConfig) ComputeUnitPriceDefault() uint64

func (*SolanaConfig) ComputeUnitPriceMax

func (c *SolanaConfig) ComputeUnitPriceMax() uint64

func (*SolanaConfig) ComputeUnitPriceMin

func (c *SolanaConfig) ComputeUnitPriceMin() uint64

func (*SolanaConfig) ConfirmPollPeriod

func (c *SolanaConfig) ConfirmPollPeriod() time.Duration

func (*SolanaConfig) FeeBumpPeriod

func (c *SolanaConfig) FeeBumpPeriod() time.Duration

func (*SolanaConfig) FeeEstimatorMode

func (c *SolanaConfig) FeeEstimatorMode() string

func (*SolanaConfig) IsEnabled

func (c *SolanaConfig) IsEnabled() bool

func (*SolanaConfig) MaxRetries

func (c *SolanaConfig) MaxRetries() *uint

func (*SolanaConfig) OCR2CachePollPeriod

func (c *SolanaConfig) OCR2CachePollPeriod() time.Duration

func (*SolanaConfig) OCR2CacheTTL

func (c *SolanaConfig) OCR2CacheTTL() time.Duration

func (*SolanaConfig) SetFrom

func (c *SolanaConfig) SetFrom(f *SolanaConfig)

func (*SolanaConfig) SkipPreflight

func (c *SolanaConfig) SkipPreflight() bool

func (*SolanaConfig) TOMLString

func (c *SolanaConfig) TOMLString() (string, error)

func (*SolanaConfig) TxConfirmTimeout

func (c *SolanaConfig) TxConfirmTimeout() time.Duration

func (*SolanaConfig) TxRetryTimeout

func (c *SolanaConfig) TxRetryTimeout() time.Duration

func (*SolanaConfig) TxTimeout

func (c *SolanaConfig) TxTimeout() time.Duration

func (*SolanaConfig) ValidateConfig

func (c *SolanaConfig) ValidateConfig() (err error)

type SolanaConfigs

type SolanaConfigs []*SolanaConfig

func (SolanaConfigs) Chains

func (cs SolanaConfigs) Chains(ids ...string) (r []relaytypes.ChainStatus, err error)

func (SolanaConfigs) Node

func (cs SolanaConfigs) Node(name string) (soldb.Node, error)

func (SolanaConfigs) NodeStatus added in v2.1.0

func (cs SolanaConfigs) NodeStatus(name string) (relaytypes.NodeStatus, error)

func (SolanaConfigs) NodeStatuses added in v2.1.0

func (cs SolanaConfigs) NodeStatuses(chainIDs ...string) (ns []relaytypes.NodeStatus, err error)

func (SolanaConfigs) Nodes

func (cs SolanaConfigs) Nodes(chainID string) (ns []soldb.Node, err error)

func (*SolanaConfigs) SetFrom

func (cs *SolanaConfigs) SetFrom(fs *SolanaConfigs) (err error)

func (SolanaConfigs) ValidateConfig

func (cs SolanaConfigs) ValidateConfig() (err error)

type SolanaNodes

type SolanaNodes []*solcfg.Node

func (*SolanaNodes) SetFrom

func (ns *SolanaNodes) SetFrom(fs *SolanaNodes)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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