mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
38 lines
987 B
Go
38 lines
987 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package consensus
|
|
|
|
import "context"
|
|
|
|
// ContextInitializable can be initialized with context
|
|
type ContextInitializable interface {
|
|
InitCtx(context.Context)
|
|
}
|
|
|
|
// Contextualizable can be contextualized
|
|
type Contextualizable interface {
|
|
InitializeContext(context.Context) error
|
|
}
|
|
|
|
// LuxAssetID returns the ID of the LUX asset
|
|
func LuxAssetID(ctx context.Context) interface{} {
|
|
// This is a placeholder implementation
|
|
// In production, this would get the actual LUX asset ID from context
|
|
return nil
|
|
}
|
|
|
|
// QuantumNetworkID returns the quantum network ID from context
|
|
func QuantumNetworkID(ctx context.Context) uint32 {
|
|
if qids := GetQuantumIDs(ctx); qids != nil {
|
|
return qids.QuantumID
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// GetQuantumIDs retrieves QuantumIDs from context
|
|
func GetQuantumIDs(ctx context.Context) *QuantumIDs {
|
|
// Placeholder - would retrieve from context
|
|
return nil
|
|
}
|