pubmine

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 7 Imported by: 0

README

go-pubmine

Generator of key pairs which have pretty (vanity) public keys containing your favorite words.

This repository contains three contents:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrInitializeGenerator

type ErrInitializeGenerator struct {
	// contains filtered or unexported fields
}

func (ErrInitializeGenerator) Error

func (e ErrInitializeGenerator) Error() string

type ErrInterrupted

type ErrInterrupted struct{}

func (ErrInterrupted) Error

func (e ErrInterrupted) Error() string

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator is a type to configurate the operation setting.

func NewGenerator

func NewGenerator(prefix string, maxWorkers int64) (*Generator, error)

NewGenerator is a factory function of Generator. The argument "prefix" must be bech32 format.

func (*Generator) Mine

func (g *Generator) Mine(ctx context.Context) (*KeyPair, error)

Mine tries to mine a keypair whose public key contains the specified prefix.

func (*Generator) SimpleMine

func (g *Generator) SimpleMine(ctx context.Context) (*KeyPair, error)

SimpleMine disables concurrent process. This method is expected to be used in single thread environment like WebAssembly.

type KeyPair

type KeyPair struct {
	Public  string
	Private string
}

Keypair is a set of a public key and a private (secret) key. The both keys are encoded following nip19.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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