Documentation
¶
Overview ¶
Package localkey provides functions to load keys from ~/.lux/keys at runtime. Keys are NEVER embedded in code - they must exist on disk or be generated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoKeysFound = errors.New("no keys found in ~/.lux/keys - please generate keys first")
)
Functions ¶
func ClearCache ¶
func ClearCache()
ClearCache clears the cached key, forcing a reload on next GetLocalKey call.
func GetLocalKey ¶
func GetLocalKey() (*secp256k1.PrivateKey, error)
GetLocalKey returns the first key from ~/.lux/keys for local network operations. Keys are loaded from disk at runtime, never embedded in code. The key is cached after first load.
func MustGetLocalKey ¶
func MustGetLocalKey() *secp256k1.PrivateKey
MustGetLocalKey returns the local key or panics if not found. Use this only in contexts where key availability is guaranteed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.