config

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Datadir                              = "DATADIR"
	WalletAddr                           = "WALLET_ADDR"
	SignerAddr                           = "SIGNER_ADDR"
	SessionDuration                      = "SESSION_DURATION"
	BanDuration                          = "BAN_DURATION"
	BanThreshold                         = "BAN_THRESHOLD"
	Port                                 = "PORT"
	AdminPort                            = "ADMIN_PORT"
	EventDbType                          = "EVENT_DB_TYPE"
	DbType                               = "DB_TYPE"
	DbUrl                                = "PG_DB_URL"
	PostgresAutoCreateDB                 = "PG_DB_AUTOCREATE"
	EventDbUrl                           = "PG_EVENT_DB_URL"
	SchedulerType                        = "SCHEDULER_TYPE"
	TxBuilderType                        = "TX_BUILDER_TYPE"
	LiveStoreType                        = "LIVE_STORE_TYPE"
	RedisUrl                             = "REDIS_URL"
	RedisTxNumOfRetries                  = "REDIS_NUM_OF_RETRIES"
	LogLevel                             = "LOG_LEVEL"
	VtxoTreeExpiry                       = "VTXO_TREE_EXPIRY"
	UnilateralExitDelay                  = "UNILATERAL_EXIT_DELAY"
	PublicUnilateralExitDelay            = "PUBLIC_UNILATERAL_EXIT_DELAY"
	CheckpointExitDelay                  = "CHECKPOINT_EXIT_DELAY"
	BoardingExitDelay                    = "BOARDING_EXIT_DELAY"
	EsploraURL                           = "ESPLORA_URL"
	AlertManagerURL                      = "ALERT_MANAGER_URL"
	NoMacaroons                          = "NO_MACAROONS"
	NoTLS                                = "NO_TLS"
	TLSExtraIP                           = "TLS_EXTRA_IP"
	TLSExtraDomain                       = "TLS_EXTRA_DOMAIN"
	UnlockerType                         = "UNLOCKER_TYPE"
	UnlockerFilePath                     = "UNLOCKER_FILE_PATH"
	UnlockerPassword                     = "UNLOCKER_PASSWORD"
	NoteUriPrefix                        = "NOTE_URI_PREFIX"
	ScheduledSessionStartTime            = "SCHEDULED_SESSION_START_TIME"
	ScheduledSessionEndTime              = "SCHEDULED_SESSION_END_TIME"
	ScheduledSessionPeriod               = "SCHEDULED_SESSION_PERIOD"
	ScheduledSessionDuration             = "SCHEDULED_SESSION_DURATION"
	ScheduledSessionMinRoundParticipants = "SCHEDULED_SESSION_MIN_ROUND_PARTICIPANTS_COUNT"
	ScheduledSessionMaxRoundParticipants = "SCHEDULED_SESSION_MAX_ROUND_PARTICIPANTS_COUNT"
	OtelCollectorEndpoint                = "OTEL_COLLECTOR_ENDPOINT"
	OtelPushInterval                     = "OTEL_PUSH_INTERVAL"
	PyroscopeServerURL                   = "PYROSCOPE_SERVER_URL"
	RoundMaxParticipantsCount            = "ROUND_MAX_PARTICIPANTS_COUNT"
	RoundMinParticipantsCount            = "ROUND_MIN_PARTICIPANTS_COUNT"
	UtxoMaxAmount                        = "UTXO_MAX_AMOUNT"
	VtxoMaxAmount                        = "VTXO_MAX_AMOUNT"
	UtxoMinAmount                        = "UTXO_MIN_AMOUNT"
	VtxoMinAmount                        = "VTXO_MIN_AMOUNT"
	AllowCSVBlockType                    = "ALLOW_CSV_BLOCK_TYPE"
	HeartbeatInterval                    = "HEARTBEAT_INTERVAL"
	RoundReportServiceEnabled            = "ROUND_REPORT_ENABLED"
	SettlementMinExpiryGap               = "SETTLEMENT_MIN_EXPIRY_GAP"
	// Skip CSV validation for vtxos created before this date
	VtxoNoCsvValidationCutoffDate = "VTXO_NO_CSV_VALIDATION_CUTOFF_DATE"
	EnablePprof                   = "ENABLE_PPROF"

	DefaultPort      = 7070
	DefaultAdminPort = 7071
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Datadir         string
	Port            uint32
	AdminPort       uint32
	DbMigrationPath string
	NoTLS           bool
	NoMacaroons     bool
	LogLevel        int
	TLSExtraIPs     []string
	TLSExtraDomains []string

	DbType                    string
	EventDbType               string
	DbDir                     string
	DbUrl                     string
	EventDbUrl                string
	EventDbDir                string
	PostgresAutoCreateDB      bool
	SessionDuration           int64
	BanDuration               int64
	BanThreshold              int64 // number of crimes to trigger a ban
	SchedulerType             string
	TxBuilderType             string
	LiveStoreType             string
	RedisUrl                  string
	RedisTxNumOfRetries       int
	WalletAddr                string
	SignerAddr                string
	VtxoTreeExpiry            arklib.RelativeLocktime
	UnilateralExitDelay       arklib.RelativeLocktime
	PublicUnilateralExitDelay arklib.RelativeLocktime
	CheckpointExitDelay       arklib.RelativeLocktime
	BoardingExitDelay         arklib.RelativeLocktime
	NoteUriPrefix             string
	AllowCSVBlockType         bool
	HeartbeatInterval         int64

	VtxoNoCsvValidationCutoffDate int64

	ScheduledSessionStartTime                 int64
	ScheduledSessionEndTime                   int64
	ScheduledSessionPeriod                    int64
	ScheduledSessionDuration                  int64
	ScheduledSessionMinRoundParticipantsCount int64
	ScheduledSessionMaxRoundParticipantsCount int64
	OtelCollectorEndpoint                     string
	OtelPushInterval                          int64
	PyroscopeServerURL                        string
	RoundReportServiceEnabled                 bool

	EsploraURL      string
	AlertManagerURL string

	UnlockerType     string
	UnlockerFilePath string // file unlocker
	UnlockerPassword string // env unlocker

	RoundMinParticipantsCount int64
	RoundMaxParticipantsCount int64
	UtxoMaxAmount             int64
	UtxoMinAmount             int64
	VtxoMaxAmount             int64
	VtxoMinAmount             int64
	SettlementMinExpiryGap    int64

	EnablePprof bool
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) AdminService

func (c *Config) AdminService() application.AdminService

func (*Config) AppService

func (c *Config) AppService() (application.Service, error)

func (*Config) IndexerService

func (c *Config) IndexerService() application.IndexerService

func (*Config) RoundReportService added in v0.8.0

func (c *Config) RoundReportService() (application.RoundReportService, error)

func (*Config) SignerService added in v0.7.1

func (c *Config) SignerService() (ports.SignerService, error)

func (*Config) String

func (c *Config) String() string

func (*Config) UnlockerService

func (c *Config) UnlockerService() ports.Unlocker

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) WalletService

func (c *Config) WalletService() ports.WalletService

Jump to

Keyboard shortcuts

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