secp256k1

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-secp256k1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

func Init

func Init() bool

func SayHello

func SayHello()

Types

type PrivateKey

type PrivateKey struct {
	Data [32]byte
}

func NewPrivateKey

func NewPrivateKey(seed []byte) *PrivateKey

func NewPrivateKeyFromBase58

func NewPrivateKeyFromBase58(strPriv string) (*PrivateKey, error)

func NewPrivateKeyFromHex

func NewPrivateKeyFromHex(strPriv string) (*PrivateKey, error)

func (*PrivateKey) GetPublicKey

func (priv *PrivateKey) GetPublicKey() *PublicKey

func (*PrivateKey) Sign

func (priv *PrivateKey) Sign(digest []byte) (*Signature, error)

func (*PrivateKey) String

func (priv *PrivateKey) String() string

type PublicKey

type PublicKey struct {
	Data [33]byte
}

func GetPublicKey

func GetPublicKey(seckey *PrivateKey) (*PublicKey, error)

func NewPublicKeyFromBase58

func NewPublicKeyFromBase58(strPub string) (*PublicKey, error)

func Recover

func Recover(digest []byte, signature *Signature) (*PublicKey, error)

digest is 32 bytes signature is 65 bytes pubkey is 33 bytes

func (*PublicKey) Bytes

func (pk *PublicKey) Bytes() []byte

func (*PublicKey) String

func (pk *PublicKey) String() string

func (*PublicKey) StringAMAX

func (pk *PublicKey) StringAMAX() string

func (*PublicKey) StringEOS

func (pk *PublicKey) StringEOS() string

type Signature

type Signature struct {
	Data [65]byte
}

func NewSignature

func NewSignature(sig []byte) *Signature

func NewSignatureFromBase58

func NewSignatureFromBase58(sig string) (*Signature, error)

func Sign

func Sign(digest []byte, seckey *PrivateKey) (*Signature, error)

func (*Signature) Bytes

func (sig *Signature) Bytes() []byte

func (*Signature) String

func (sig *Signature) String() string

Jump to

Keyboard shortcuts

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