Lux SDKGoPackages

configspec

Package configspec provides the embedded luxd configuration specification.

import "github.com/luxfi/sdk/configspec"

Package configspec provides the embedded luxd configuration specification.

Deprecated: Use github.com/luxfi/config/spec instead. This package will be removed in a future release. The canonical location for configspec is now github.com/luxfi/config/spec.

This is a snapshot of the node's configuration spec for use by SDK consumers without requiring a dependency on the node package.

The spec.json file is generated from the node using:

go run github.com/luxfi/node/cmd/config dump-spec --format=json > spec.json

To regenerate, run:

go generate ./...

Functions

AllKeys

func AllKeys() []string

AllKeys returns all known configuration keys.

KnownKey

func KnownKey(key string) bool

KnownKey checks if a key is a valid configuration flag.

NodeVersion

func NodeVersion() string

NodeVersion returns the node version this spec was generated from.

Version

func Version() string

Version returns the spec version.

Types

Category

Category groups related configuration flags.

ConfigSpec

ConfigSpec is the complete specification of all luxd configuration flags.

func MustSpec() *ConfigSpec
func Spec() (*ConfigSpec, error)
func (s *ConfigSpec) AllKeys() []string
func (s *ConfigSpec) DeprecatedFlags() []FlagSpec
func (s *ConfigSpec) FlagsByCategory(cat Category) []FlagSpec
func (s *ConfigSpec) GetFlag(key string) *FlagSpec
func (s *ConfigSpec) KnownKey(key string) bool

Constraints

Constraints defines validation rules for a flag.

FlagSpec

FlagSpec describes a single configuration flag.

FlagType

FlagType represents the type of a configuration flag.