ethcrypto

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePrefixedHash

func GeneratePrefixedHash(data []byte) []byte

func GetAddrPrivKeyFromKeyStore

func GetAddrPrivKeyFromKeyStore(keyStore, passPhrase string) (common.Address, string, error)

func RecoverSigner

func RecoverSigner(data []byte, sig []byte) common.Address

func SigIsValid

func SigIsValid(signer common.Address, data []byte, sig []byte) bool

Types

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(privateKey string, chainId *big.Int) (*Signer, error)

func NewSignerFromKeystore

func NewSignerFromKeystore(keyStore, passPhrase string, chainId *big.Int) (*Signer, error)

func (*Signer) SignEthMessage

func (s *Signer) SignEthMessage(data []byte) ([]byte, error)

input data: a byte array of raw message to be signed return a byte array signature in the R,S,V format

func (*Signer) SignEthTransaction

func (s *Signer) SignEthTransaction(rawTx []byte) ([]byte, error)

input rawTx: a byte array of a RLP-encoded unsigned Ethereum raw transaction return a byte array signed raw tx in RLP-encoded format

Jump to

Keyboard shortcuts

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