ethutil

package
v0.3.28 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EthTrieHash

func EthTrieHash(values map[string]string) string

func JsonMarshal

func JsonMarshal(value map[string]interface{}) (string, error)

The default behavior is to escape &, <, and > to \u0026, \u003c, and \u003e to avoid certain safety problems that can arise when embedding JSON in HTML.

func RecoverPublickeyBySignature

func RecoverPublickeyBySignature(msg, sig string) (string, error)

func Sign

func Sign(data []byte, privateKey string) (string, error)

func SignByEth

func SignByEth(data []byte, privateKey *ecdsa.PrivateKey) (string, error)

func ToSignatureByExclude

func ToSignatureByExclude(obj interface{}, excludes ...string) (string, error)

func Verify

func Verify(data []byte, signature, public string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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