config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ChainFamilyName = "stellar"

ChainFamilyName is the canonical chain family identifier for Stellar.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Name *string       `toml:"Name"`
	URL  *clconfig.URL `toml:"URL"`
}

Node represents a single Soroban RPC endpoint.

func (*Node) ValidateConfig

func (n *Node) ValidateConfig() (err error)

ValidateConfig returns an error for any missing or empty required field.

type Nodes

type Nodes []*Node

Nodes is a slice of Node pointers.

type TOMLConfig

type TOMLConfig struct {
	// Enabled controls whether this chain is active. Nil means enabled (default).
	Enabled *bool `toml:"Enabled"`

	// ChainID is the unique identifier for this chain configuration
	ChainID string `toml:"ChainID"`

	// Nodes lists the Soroban RPC endpoints for this chain.
	Nodes Nodes `toml:"Nodes"`

	// TxManager holds optional Stellar transaction manager settings. Omitted
	// fields use defaults applied inside txm.New (see txm.DefaultConfigSet).
	TxManager txm.Config `toml:"TxManager"`
}

TOMLConfig is the parsed configuration for a single Stellar chain as it appears inside [[Stellar]] in the Chainlink node TOML.

func NewDecodedTOMLConfig

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

NewDecodedTOMLConfig decodes rawConfig as Stellar TOML and validates the result

func (*TOMLConfig) IsEnabled

func (c *TOMLConfig) IsEnabled() bool

IsEnabled returns true when the chain is not explicitly disabled.

func (*TOMLConfig) TOMLString

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

TOMLString serialises the config back to TOML

func (*TOMLConfig) ValidateConfig

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

ValidateConfig returns a combined error for all invalid or missing required fields

Jump to

Keyboard shortcuts

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