utils

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ecrecover

func Ecrecover(hash, sig []byte) (common.Address, error)

This is exact copy of the function from internal/controllers/helpers/handlers.go Ecrecover mimics the ecrecover opcode, returning the address that signed hash with signature. sig must have length 65 and the last byte, the recovery byte usually denoted v, must be 27 or 28.

func VerifySignature

func VerifySignature(body []byte, signature string, ethAddr string) (bool, error)

VerifySignature godoc checks if the provided signature corresponds to the given message and Ethereum address. body []byte The original message that was signed. signature string The signature that needs to be verified. ethAddr string The Ethereum address of the signer. @return bool Indicates whether the signature is valid or not. @return error If there was an issue during the verification process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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