Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeSecp256k1 = byte(0x02) NameSecp256k1 = "secp256k1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivKeySecp256k1 ¶
type PrivKeySecp256k1 [32]byte
PrivKey
func (PrivKeySecp256k1) Bytes ¶
func (privKey PrivKeySecp256k1) Bytes() []byte
func (PrivKeySecp256k1) Equals ¶
func (privKey PrivKeySecp256k1) Equals(other PrivKey) bool
func (PrivKeySecp256k1) PubKey ¶
func (privKey PrivKeySecp256k1) PubKey() PubKey
func (PrivKeySecp256k1) Sign ¶
func (privKey PrivKeySecp256k1) Sign(msg []byte) Signature
func (PrivKeySecp256k1) String ¶
func (privKey PrivKeySecp256k1) String() string
type PubKeySecp256k1 ¶
type PubKeySecp256k1 [33]byte
Compressed pubkey (just the x-cord), prefixed with 0x02 or 0x03, depending on the y-cord.
func (PubKeySecp256k1) Bytes ¶
func (pubKey PubKeySecp256k1) Bytes() []byte
func (PubKeySecp256k1) Equals ¶
func (pubKey PubKeySecp256k1) Equals(other PubKey) bool
func (PubKeySecp256k1) KeyString ¶
func (pubKey PubKeySecp256k1) KeyString() string
Must return the full bytes in hex. Used for map keying, etc.
func (PubKeySecp256k1) String ¶
func (pubKey PubKeySecp256k1) String() string
func (PubKeySecp256k1) VerifyBytes ¶
func (pubKey PubKeySecp256k1) VerifyBytes(msg []byte, sig_ Signature) bool
type Secp256k1Driver ¶
type Secp256k1Driver struct{}
func (Secp256k1Driver) PrivKeyFromBytes ¶
func (d Secp256k1Driver) PrivKeyFromBytes(b []byte) (privKey PrivKey, err error)
func (Secp256k1Driver) PubKeyFromBytes ¶
func (d Secp256k1Driver) PubKeyFromBytes(b []byte) (pubKey PubKey, err error)
func (Secp256k1Driver) SignatureFromBytes ¶
func (d Secp256k1Driver) SignatureFromBytes(b []byte) (sig Signature, err error)
type SignatureS ¶
type SignatureS struct {
Signature
}
type SignatureSecp256k1 ¶
type SignatureSecp256k1 []byte
Signature
func (SignatureSecp256k1) Bytes ¶
func (sig SignatureSecp256k1) Bytes() []byte
func (SignatureSecp256k1) Equals ¶
func (sig SignatureSecp256k1) Equals(other Signature) bool
func (SignatureSecp256k1) IsZero ¶
func (sig SignatureSecp256k1) IsZero() bool
func (SignatureSecp256k1) String ¶
func (sig SignatureSecp256k1) String() string
Click to show internal directories.
Click to hide internal directories.