ethcrypto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromECDSAPub

func FromECDSAPub(pub *ecdsa.PublicKey) []byte

func GenerateEthereumData

func GenerateEthereumData(args *[]interface{}, functionName string, functionSignatures map[string]string) (string, error)

GenerateEthereumData generates Ethereum data for calling a function at a specific address

func GenerateKey

func GenerateKey() (*ecdsa.PrivateKey, error)

GenerateKey generates a new private key.

func HexToECDSA

func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)

func Keccak256

func Keccak256(data ...[]byte) []byte

Keccak256 calculates and returns the Keccak256 hash of the input data.

func NewKeccakState

func NewKeccakState() types.KeccakState

NewKeccakState creates a new KeccakState

func S256

func S256() elliptic.Curve

S256 returns an instance of the secp256k1 curve.

func ToECDSA

func ToECDSA(d []byte) (*ecdsa.PrivateKey, error)

Types

type Address

type Address [types.AddressLength]byte

func BytesToAddress

func BytesToAddress(b []byte) Address

func PubkeyToAddress

func PubkeyToAddress(p ecdsa.PublicKey) Address

func (*Address) SetBytes

func (a *Address) SetBytes(b []byte)

Jump to

Keyboard shortcuts

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