Documentation ¶
Overview ¶
Package keygen provides functions to generate Bitcoin private keys and relevant details.
Index ¶
- func ChecksumCheck(base58Str string) (valid bool)
- func Decode(base58Str string) (version, payload string)
- func Encode(version, payload string) (base58Str string, err error)
- func GenPrivateKey() (privateKey string)
- func IsPrivateKeyValid(privateKey string) (valid bool)
- func Private2Address(privateKey string, compressed, mainnet bool) (address string, err error)
- func Private2Public(privateKey string, compressed bool) (publicKey string, err error)
- func Private2WIF(privateKey string, compressed, mainnet bool) (wif string, err error)
- func Public2Address(publicKey string, mainnet bool) (address string, err error)
- func WIF2Private(wif string, compressed bool) (privateKey string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChecksumCheck ¶
ChecksumCheck checks if a Base58Check string is valid.
func GenPrivateKey ¶
func GenPrivateKey() (privateKey string)
GenPrivateKey generates a hex encoded private key.
func IsPrivateKeyValid ¶
IsPrivateKeyValid checks if a given string is a valid private key.
func Private2Address ¶
Private2Address returns the address associated with a private key.
func Private2Public ¶
Private2Public returns the public key associated with a private key (hex string).
func Private2WIF ¶
Private2WIF returns the Wallet Import Format (WIF) associated with a private key (hex string).
func Public2Address ¶
Public2Address returns the address associated with a public key.
func WIF2Private ¶
WIF2Private returns the private key associated with a Wallet Import Format (WIF).
Types ¶
This section is empty.