common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const PubKeySize = 33

Variables

This section is empty.

Functions

This section is empty.

Types

type PubKey

type PubKey [PubKeySize]byte

func NewPubKeyFromBytes

func NewPubKeyFromBytes(b []byte) (PubKey, error)

NewPubKeyFromBytes returns a new PubKey based on a serialized pubkey in a byte slice.

func NewPubKeyFromKey

func NewPubKeyFromKey(key *btcec.PublicKey) PubKey

NewPubKeyFromKey returns a strongly typed serialized key from a secp256k1.PublicKey instance.

func NewPubKeyFromStr

func NewPubKeyFromStr(v string) (PubKey, error)

NewPubKeyFromStr returns a new PubKey given its hex-encoded string format.

func (PubKey) String

func (v PubKey) String() string

String returns a human readable version of the PubKey which is the hex-encoding of the serialized compressed public key.

Jump to

Keyboard shortcuts

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