tui

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

vanity_old.go — deprecated vanity inner-loop logic, kept for benchmark comparison.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentIdentity

func CurrentIdentity() (npub, privKeyHex string, err error)

CurrentIdentity reads the saved identity from ~/.config/microchat/config.json.

func FormatCount

func FormatCount(n int64) string

FormatCount formats n with underscore thousands separators (e.g. 1_234_567).

func GenerateKeypair

func GenerateKeypair() (npub, privKeyHex string, err error)

GenerateKeypair generates a random secp256k1 keypair and returns npub and private key hex.

func GenerateVanityKeypair

func GenerateVanityKeypair(ctx context.Context, suffix string, counter *atomic.Int64) (npub, privKeyHex string, err error)

GenerateVanityKeypair finds a keypair whose npub ends with suffix.

func Run

func Run() error

func ValidateVanitySuffix

func ValidateVanitySuffix(suffix string) error

ValidateVanitySuffix returns a descriptive error if suffix is invalid, or nil.

func ValidateVanitySuffixUnsafe

func ValidateVanitySuffixUnsafe(suffix string) error

ValidateVanitySuffixUnsafe validates only charset validity (no length cap). Intended for CLI use with --unsafe-cpu-usage.

Types

type ServerStatus

type ServerStatus string
const (
	ServerStatusActive    ServerStatus = "active"
	ServerStatusHidden    ServerStatus = "hidden"
	ServerStatusAdvertise ServerStatus = "advertise"
)

Jump to

Keyboard shortcuts

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