isxsecp256k1

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

isxsecp256k1 provides a wrapper around the secp256k1 package from dcrec --which is an actively maintained codebase built from btcd.

Since Ethereum uses secp256k1 in special ways, this package exists to encapsulate the special ways so that it is easier to use the secp256k1 code in the 'right way.'

Sign and Recover are constructed from the secp256k1 author's advice: https://github.com/decred/dcrd/issues/2889, https://go.dev/play/p/gIbvbly7n9h

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(d [64]byte) (*secp256k1.PublicKey, error)

func DecodeCompressed

func DecodeCompressed(d [33]byte) (*secp256k1.PublicKey, error)

func Encode

func Encode(pubkey *secp256k1.PublicKey) [64]byte

func Recover

func Recover(sig [65]byte, hash [32]byte) (*secp256k1.PublicKey, error)

func Sign

func Sign(k *secp256k1.PrivateKey, d [32]byte) ([65]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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