keygen

package
v0.0.0-...-d48e410 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package keygen provides functions to generate Bitcoin private keys and relevant details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChecksumCheck

func ChecksumCheck(base58Str string) (valid bool)

ChecksumCheck checks if a Base58Check string is valid.

func Decode

func Decode(base58Str string) (version, payload string)

Decode a Base58Check string to a version byte and payload.

func Encode

func Encode(version, payload string) (base58Str string, err error)

Encode a version byte and payload to creates a Base58Check string.

func GenPrivateKey

func GenPrivateKey() (privateKey string)

GenPrivateKey generates a hex encoded private key.

func IsPrivateKeyValid

func IsPrivateKeyValid(privateKey string) (valid bool)

IsPrivateKeyValid checks if a given string is a valid private key.

func Private2Address

func Private2Address(privateKey string, compressed, mainnet bool) (address string, err error)

Private2Address returns the address associated with a private key.

func Private2Public

func Private2Public(privateKey string, compressed bool) (publicKey string, err error)

Private2Public returns the public key associated with a private key (hex string).

func Private2WIF

func Private2WIF(privateKey string, compressed, mainnet bool) (wif string, err error)

Private2WIF returns the Wallet Import Format (WIF) associated with a private key (hex string).

func Public2Address

func Public2Address(publicKey string, mainnet bool) (address string, err error)

Public2Address returns the address associated with a public key.

func WIF2Private

func WIF2Private(wif string, compressed bool) (privateKey string)

WIF2Private returns the private key associated with a Wallet Import Format (WIF).

Types

This section is empty.

Jump to

Keyboard shortcuts

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