crypto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EthereumMessageSalt = "\x19Ethereum Signed Message:\n%d%s"
)

Variables

This section is empty.

Functions

func EIP191Prefix

func EIP191Prefix(data []byte) []byte

EIP191Prefix returns the EIP-191 prefix for a message.

func NewNonce

func NewNonce() (string, error)

NewNonce generates a new nonce.

func NonceToSignMessage

func NonceToSignMessage(nonce string) string

NonceToSignMessage returns a message with nonce to sign.

func VerifyEIP191Signature

func VerifyEIP191Signature(signature string, rawMessage string, address common.Address) (bool, error)

VerifyEIP191Signature verifies the signature of a message using the EIP-191 standard. Returns true if the signature is valid, false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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