wif

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWif

func DecodeWif(wif string) ([]byte, error)

Decode can be used to turn WIF into a raw private key (32 bytes).

func GetPublicKey

func GetPublicKey(wif string) ([]byte, error)

GetPublicKey returns the public key associated with the given WIF in the 33-byte compressed format.

Types

type PrivateKey

type PrivateKey struct {
	Raw *btcutil.WIF
}

func (*PrivateKey) FromByte

func (p *PrivateKey) FromByte(raw []byte) (err error)

func (*PrivateKey) FromWif

func (p *PrivateKey) FromWif(wif string) (err error)

Get a raw private key (32 bytes) from WIF.

func (*PrivateKey) ToByte

func (p *PrivateKey) ToByte() []byte

func (*PrivateKey) ToPubKeyStr

func (p *PrivateKey) ToPubKeyStr() string

func (*PrivateKey) ToWif

func (p *PrivateKey) ToWif() string

type PublicKey

type PublicKey struct {
	Raw *secp256k1.PublicKey
}

func (*PublicKey) FromByte

func (p *PublicKey) FromByte(raw []byte) (err error)

Get a raw public key from []byte.

func (*PublicKey) FromStr

func (p *PublicKey) FromStr(pubKey string) (err error)

Get a raw public key from Public String (STM...).

func (*PublicKey) FromWif

func (p *PublicKey) FromWif(wif string) (err error)

func (*PublicKey) ToByte

func (p *PublicKey) ToByte() []byte

func (*PublicKey) ToStr

func (p *PublicKey) ToStr() string

Jump to

Keyboard shortcuts

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