config

package
v0.1.33 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApplicationConfigUnmarshalYAML     = sdkerrors.Register(types.ModuleName, 2100, "config reader cannot unmarshal yaml content")
	ErrApplicationConfigInvalidServiceId  = sdkerrors.Register(types.ModuleName, 2101, "invalid serviceId in application config")
	ErrApplicationConfigEmptyContent      = sdkerrors.Register(types.ModuleName, 2102, "empty application config content")
	ErrApplicationConfigInvalidStake      = sdkerrors.Register(types.ModuleName, 2103, "invalid stake amount in application config")
	ErrApplicationConfigInvalidGateway    = sdkerrors.Register(types.ModuleName, 2104, "invalid gateway address in application config")
	ErrApplicationConfigInvalidSpendLimit = sdkerrors.Register(types.ModuleName, 2105, "invalid per-session spend limit in application config")
)

Functions

This section is empty.

Types

type ApplicationStakeConfig

type ApplicationStakeConfig struct {
	// StakeAmount is the amount of upokt tokens that the application is willing to stake
	StakeAmount sdk.Coin
	// Services is the list of services that the application is willing to stake for
	Services []*sharedtypes.ApplicationServiceConfig
	// GatewayAddresses is an optional list of gateway addresses to delegate to
	GatewayAddresses []string
	// PerSessionSpendLimit is an optional per-session spend limit in upokt
	PerSessionSpendLimit *sdk.Coin
}

func ParseApplicationConfigs

func ParseApplicationConfigs(configContent []byte) (*ApplicationStakeConfig, error)

ParseApplicationConfig parses the stake config file and returns a slice of ApplicationServiceConfig

type YAMLApplicationConfig

type YAMLApplicationConfig struct {
	StakeAmount          string   `yaml:"stake_amount"`
	ServiceIds           []string `yaml:"service_ids"`
	GatewayAddresses     []string `yaml:"gateway_addresses"`
	PerSessionSpendLimit string   `yaml:"per_session_spend_limit"`
}

YAMLApplicationConfig is the structure describing a single service stake entry in the stake config file TODO_DOCUMENT(@red-0ne): Add additional documentation on app config files.

Jump to

Keyboard shortcuts

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