utils

package
v0.0.0-...-c1b05a4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthFromKeystore

func GetAuthFromKeystore(path string, password string) (*bind.TransactOpts, error)

func GetPrivateKayFromKeystore

func GetPrivateKayFromKeystore(path string, password string) (*ecdsa.PrivateKey, error)

func IsSignatureValid

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

func RecoverSigner

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

func SignData

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

func SignHash

func SignHash(privateKey *ecdsa.PrivateKey, hash []byte) ([]byte, error)

func SignPackedData

func SignPackedData(privateKey *ecdsa.PrivateKey, types []string, data []interface{}) ([]byte, error)

func WaitMined

func WaitMined(ctx context.Context, ec *ethclient.Client,
	tx *types.Transaction, blockDelay uint64) (*types.Receipt, error)

func WaitMinedWithTxHash

func WaitMinedWithTxHash(ctx context.Context, ec *ethclient.Client,
	txHash string, blockDelay uint64) (*types.Receipt, error)

WaitMined waits for tx to be mined on the blockchain It returns tx receipt when the tx has been mined and enough block confirmations have passed

Types

This section is empty.

Jump to

Keyboard shortcuts

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