Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VanityCreate2Flags ¶ added in v1.9.1
VanityCreate2Flags returns CLI flags for CREATE2 vanity address generation
func VanityFlags ¶ added in v1.9.1
Types ¶
type AddressGenerator ¶ added in v1.9.1
type AddressGenerator interface {
// Generate generates a new address and returns the address string and any associated data
Generate() (address string, data interface{}, err error)
}
AddressGenerator is an interface for generating addresses
type ChecksumFunc ¶ added in v1.16.0
ChecksumFunc converts a lowercase address (e.g. hex for Ethereum) into its display-cased form (e.g. EIP-55). If the matcher has one set, it treats the incoming address as lowercase and defers the checksum computation until a lowercase prefilter passes — avoiding the cost on every candidate.
Ethereum generators set this; chains whose encoding is inherently case-sensitive (base58 etc.) leave it nil and feed the address as-is.
type Config ¶
type Config struct {
Banner string
Git map[string]GitAccount
SSH map[string]SSHAccount
Proxy map[string]Proxy
Snippet map[string]string
}
type GitAccount ¶
type SSHAccount ¶
func (SSHAccount) GetPort ¶
func (sa SSHAccount) GetPort() string
type VanityConfig ¶ added in v1.9.1
type VanityConfig struct {
Contains string
Mode VanityMode
CaseSensitive bool
UpperOrLower bool
Threads int
Mask []byte // (address & Mask) == MaskValue
MaskValue []byte
}
func ParseVanityConfig ¶ added in v1.9.1
func ParseVanityConfig(cmd *cli.Command) (*VanityConfig, error)
type VanityMatcher ¶ added in v1.9.1
type VanityMatcher struct {
// contains filtered or unexported fields
}
VanityMatcher performs address matching based on configuration
func NewVanityMatcher ¶ added in v1.9.1
func NewVanityMatcher(config *VanityConfig) *VanityMatcher
NewVanityMatcher creates a new matcher with the given configuration
func (*VanityMatcher) Match ¶ added in v1.9.1
func (m *VanityMatcher) Match(address string) bool
type VanityMode ¶ added in v1.16.0
type VanityMode int
VanityMode selects how config.Contains is matched against candidate addresses.
const ( VanityModePrefix VanityMode = iota + 1 // match at the start VanityModeSuffix // match at the end VanityModePrefixOrSuffix // match at either end VanityModePrefixAndSuffix // match at both ends (non-overlapping) )
type VanityResult ¶ added in v1.9.1
type VanityResult struct {
Address string
Data interface{}
}
VanityResult holds the result of a vanity search
type VanitySearcher ¶ added in v1.9.1
type VanitySearcher struct {
// contains filtered or unexported fields
}
VanitySearcher performs vanity address search with multiple threads
func NewVanitySearcher ¶ added in v1.9.1
func NewVanitySearcher(config *VanityConfig, generator AddressGenerator) *VanitySearcher
NewVanitySearcher creates a new searcher
func (*VanitySearcher) Search ¶ added in v1.9.1
func (s *VanitySearcher) Search(ctx context.Context) (*VanityResult, error)
Search performs the vanity address search
func (*VanitySearcher) WithChecksum ¶ added in v1.16.0
func (s *VanitySearcher) WithChecksum(fn ChecksumFunc) *VanitySearcher
WithChecksum wires in a checksum function so the matcher can treat the generator's output as lowercase and compute the display form only on hits. Chainable: returns the searcher.