Documentation
¶
Overview ¶
Package keycmd provides commands for managing cryptographic keys. Keys are stored in ~/.lux/keys/<name>/{ec,bls,rt,mldsa}/ directories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶
func NewCmd(injectedApp *application.Lux) *cobra.Command
NewCmd creates the key command suite. Commands:
- lux key create <name> - Generate new key set from mnemonic
- lux key list - List all key sets
- lux key show <name> - Show key set details and addresses
- lux key delete <name> - Delete a key set
- lux key export <name> - Export key set (mnemonic or individual keys)
- lux key import <name> - Import key set from mnemonic
- lux key lock [name] - Lock a key (clear from memory)
- lux key unlock <name> - Unlock a key for use
- lux key backend - Manage key storage backends
- lux key kchain - K-Chain distributed key management
Types ¶
type Genesis ¶ added in v1.21.24
type Genesis struct {
NetworkID uint32 `json:"networkID"`
Allocations []GenesisAllocation `json:"allocations"`
StartTime uint64 `json:"startTime"`
InitialStakeDuration uint64 `json:"initialStakeDuration"`
InitialStakeDurationOffset uint64 `json:"initialStakeDurationOffset"`
InitialStakedFunds []string `json:"initialStakedFunds"`
InitialStakers []InitialStaker `json:"initialStakers"`
CChainGenesis string `json:"cChainGenesis"`
XChainGenesis string `json:"xChainGenesis"`
Message string `json:"message"`
}
type GenesisAllocation ¶ added in v1.21.24
type GenesisAllocation struct {
EthAddr string `json:"ethAddr"`
LuxAddr string `json:"luxAddr"`
InitialAmount uint64 `json:"initialAmount"`
UnlockSchedule []UnlockSchedule `json:"unlockSchedule"`
}
Genesis types for genesis.json
type InitialStaker ¶ added in v1.21.24
type NetworkConfig ¶ added in v1.21.24
type NetworkConfig struct {
NetworkID uint32
ChainID uint32
KeyPrefix string
NumPChainKeys int
NumXChainKeys int
HRP string // Human-readable part for bech32 (lux, test, local)
VestingYears int
VestingPercent float64
Message string
}
Network configuration
type UnlockSchedule ¶ added in v1.21.24
type ValidatorKeyInfo ¶ added in v1.21.39
type ValidatorKeyInfo struct {
Index uint32 `json:"index"`
PrivateKey string `json:"private_key"`
EthAddress string `json:"eth_address"`
PChain string `json:"p_chain"`
XChain string `json:"x_chain"`
ShortID string `json:"short_id"`
}
ValidatorKeyInfo represents exported validator key information
type XChainGenesis ¶ added in v1.21.24
type XChainGenesis struct {
Allocations []GenesisAllocation `json:"allocations"`
StartTime uint64 `json:"startTime"`
InitialStakeDuration uint64 `json:"initialStakeDuration"`
InitialStakeDurationOffset uint64 `json:"initialStakeDurationOffset"`
InitialStakedFunds []string `json:"initialStakedFunds"`
InitialStakers []interface{} `json:"initialStakers"`
}
Click to show internal directories.
Click to hide internal directories.