Files
zeekayandHanzo Dev 85d351032a The local endpoint spells the segment once
ChainAliasPrefix is what a chain's routes hang from, and the local websocket
endpoint restated it as a literal — so the rename to /v1/chain left this one
address behind on /v1/bc, in the very package that defines the segment.

It now derives from the constant, which is the only way the two cannot disagree.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-30 17:50:23 -07:00

37 lines
1.3 KiB
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package constants
import "time"
// CLI and operational constants (extends paths.go)
const (
// Remote network API endpoints
// Each network has: api.lux{-suffix}.network for HTTP, wss.lux{-suffix}.network for WebSocket
MainnetAPIEndpoint = "https://api.lux.network"
MainnetWSEndpoint = "wss://wss.lux.network"
TestnetAPIEndpoint = "https://api.lux-test.network"
TestnetWSEndpoint = "wss://wss.lux-test.network"
DevnetAPIEndpoint = "https://api.lux-dev.network"
DevnetWSEndpoint = "wss://wss.lux-dev.network"
// Local network (single-node dev mode or 3-node localnet)
LocalAPIEndpoint = "http://127.0.0.1:9630"
LocalWSEndpoint = "ws://127.0.0.1:9630/v1/" + ChainAliasPrefix + "/C/ws"
LocalNetworkID = LocalID // 1337
NetrunnerLocalNetworkID = LocalID // 1337
LocalNetworkNumNodes = 3
// Staking constants
MinStakeDuration = 24 * 14 * time.Hour // 2 weeks
MaxStakeDuration = 24 * 365 * time.Hour // 1 year
MinStakeWeight = uint64(1)
StakingStartLeadTime = 1 * time.Minute
TimeParseLayout = "2006-01-02 15:04:05"
// Version management
LuxCompatibilityURL = "https://raw.githubusercontent.com/luxfi/cli/main/lux-compatibility.json"
DefaultLuxdVersion = "v1.21.0"
)