config

package
v0.0.0-...-3bbd3ac Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBroadcastChannelSize       = uint64(4096)
	DefaultMaxConcurrentRequests      = int64(500)
	DefaultRetryCount                 = int64(5)
	DefaultMaxGasLimit                = int64(10000000)
	DefaultTxTimeoutSeconds           = 120
	DefaultConfirmPollSecs            = int64(10)
	DefaultBalancePollIntervalSeconds = int64(10)

	DefaultIndexerPollIntervalSecs = uint64(10)
	DefaultIndexerSyncTimeoutSecs  = uint64(60)

	DefaultReaperPollSecs           = uint64(10)
	DefaultTransactionRetentionSecs = uint64(10)
)

Default constant values

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceMonitorConfig

type BalanceMonitorConfig struct {
	BalancePollPeriod *string
}

type ChainInfo

type ChainInfo struct {
	ChainFamilyName string
	ChainID         string
	NetworkName     string
	NetworkNameFull string
}

type IndexerConfig

type IndexerConfig struct {
	PollingIntervalSecs *uint64
	SyncTimeoutSecs     *uint64
}

type NodeConfig

type NodeConfig struct {
	Name *string
	URL  *config.URL
}

func (*NodeConfig) ValidateConfig

func (n *NodeConfig) ValidateConfig() error

type NodeConfigs

type NodeConfigs []*NodeConfig

func (NodeConfigs) SelectRandom

func (ns NodeConfigs) SelectRandom() (*NodeConfig, error)

func (*NodeConfigs) SetFrom

func (ns *NodeConfigs) SetFrom(fs *NodeConfigs)

type TOMLConfig

type TOMLConfig struct {
	// ChainID is a unique identifier for the Sui chain
	ChainID *string

	// Enabled determines if this chain configuration is active
	// If nil, defaults to true. Use IsEnabled() method to check.
	Enabled *bool

	// NetworkName is the name of the Sui network
	NetworkName *string

	// NetworkNameFull is the full name of the Sui network
	NetworkNameFull *string

	// ChainConfig holds chain-specific configuration parameters
	TransactionManager *TransactionManagerConfig

	// Balance monitor config
	BalanceMonitor *BalanceMonitorConfig

	// Transactions indexer configs (without any transmitter specs, transmitters are attached later)
	TransactionsIndexer *IndexerConfig

	// Events indexer configs (without any event selectors, those are attached later)
	EventsIndexer *IndexerConfig

	// Nodes is a collection of node configurations for this chain
	Nodes NodeConfigs
}

func NewDecodedTOMLConfig

func NewDecodedTOMLConfig(rawConfig string) (*TOMLConfig, error)

decodeConfig decodes the rawConfig as (Aptos) TOML and sets default values

func (*TOMLConfig) IsEnabled

func (c *TOMLConfig) IsEnabled() bool

func (*TOMLConfig) ListNodes

func (c *TOMLConfig) ListNodes() NodeConfigs

func (*TOMLConfig) SetFrom

func (c *TOMLConfig) SetFrom(f *TOMLConfig)

func (*TOMLConfig) TOMLString

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

func (*TOMLConfig) ValidateConfig

func (c *TOMLConfig) ValidateConfig() error

type TOMLConfigs

type TOMLConfigs []*TOMLConfig

func (*TOMLConfigs) SetFrom

func (cs *TOMLConfigs) SetFrom(fs *TOMLConfigs) error

func (TOMLConfigs) ValidateConfig

func (cs TOMLConfigs) ValidateConfig() error

type TransactionManagerConfig

type TransactionManagerConfig struct {
	BroadcastChanSize        *uint64
	ConfirmPollSecs          *uint64
	DefaultMaxGasAmount      *uint64
	MaxTxRetryAttempts       *uint64
	RequestType              *string
	TransactionTimeout       *string
	MaxConcurrentRequests    *uint64
	ReaperPollSecs           *uint64
	TransactionRetentionSecs *uint64
}

Jump to

Keyboard shortcuts

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