Documentation ¶
Overview ¶
Package pub is a wrapper around secp256k1 library from the Decred project to handle generate and serialise secp256k1 public keys, including deriving them from private keys.
Index ¶
Constants ¶
View Source
const ( // KeyLen is the length of the serialized key. It is an ECDSA compressed // key. KeyLen = secp256k1.PubKeyBytesLenCompressed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key secp256k1.PublicKey
Key is a public key.
func FromBytes ¶
FromBytes converts a byte slice into a public key, if it is valid and on the secp256k1 elliptic curve.
func (*Key) ToBytes ¶
ToBytes returns the compressed 33 byte form of the pubkey as used in wire and storage forms.
func (*Key) ToPublicKey ¶
func (pub *Key) ToPublicKey() *secp256k1.PublicKey
Click to show internal directories.
Click to hide internal directories.