Documentation
¶
Overview ¶
vanity_old.go — deprecated vanity inner-loop logic, kept for benchmark comparison.
Index ¶
- func CurrentIdentity() (npub, privKeyHex string, err error)
- func FormatCount(n int64) string
- func GenerateKeypair() (npub, privKeyHex string, err error)
- func GenerateVanityKeypair(ctx context.Context, suffix string, counter *atomic.Int64) (npub, privKeyHex string, err error)
- func Run() error
- func ValidateVanitySuffix(suffix string) error
- func ValidateVanitySuffixUnsafe(suffix string) error
- type ServerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentIdentity ¶
CurrentIdentity reads the saved identity from ~/.config/microchat/config.json.
func FormatCount ¶
FormatCount formats n with underscore thousands separators (e.g. 1_234_567).
func GenerateKeypair ¶
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 ValidateVanitySuffix ¶
ValidateVanitySuffix returns a descriptive error if suffix is invalid, or nil.
func ValidateVanitySuffixUnsafe ¶
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" )
Click to show internal directories.
Click to hide internal directories.