testutils

package
v0.14.0-rc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyEthereumSignature

func VerifyEthereumSignature(
	t *testing.T,
	hash []byte,
	signature *ecdsa.Signature,
	expectedPublicKey *ecdsa.PublicKey,
)

VerifyEthereumSignature validates that signature in form (r, s, recoveryID) is a valid ethereum signature. `SigToPub` is a wrapper on `Ecrecover` that allows us to validate a signature in the same way as it's done on-chain, we extract public key from the signature and compare it with signer's public key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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