keycmd

package
v1.21.41 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: BSD-3-Clause Imports: 20 Imported by: 0

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 InitialStaker struct {
	NodeID        string `json:"nodeID"`
	RewardAddress string `json:"rewardAddress"`
	DelegationFee uint64 `json:"delegationFee"`
	Signer        struct {
		PublicKey         string `json:"publicKey"`
		ProofOfPossession string `json:"proofOfPossession"`
	} `json:"signer"`
}

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 UnlockSchedule struct {
	Amount   uint64 `json:"amount"`
	Locktime uint64 `json:"locktime"`
}

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"`
}

Jump to

Keyboard shortcuts

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