chain

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptKeyfile added in v1.1.0

func DecryptKeyfile(keyfile, password string) (*ecdsa.PrivateKey, error)

func EtherToWei added in v1.1.0

func EtherToWei(amount float64) *big.Int

func Has0xPrefix added in v1.2.0

func Has0xPrefix(str string) bool

func IsValidAddress

func IsValidAddress(address string, checksummed bool) bool

func ResolveKeyfilePath

func ResolveKeyfilePath(keydir string) (string, error)

Types

type TxBuild

type TxBuild struct {
	// contains filtered or unexported fields
}

func (*TxBuild) Sender

func (b *TxBuild) Sender() common.Address

func (*TxBuild) Transfer

func (b *TxBuild) Transfer(ctx context.Context, to string, value *big.Int) (common.Hash, error)

type TxBuilder

type TxBuilder interface {
	Sender() common.Address
	Transfer(ctx context.Context, to string, value *big.Int) (common.Hash, error)
}

func NewTxBuilder

func NewTxBuilder(provider string, privateKey *ecdsa.PrivateKey, chainID *big.Int) (TxBuilder, error)

Jump to

Keyboard shortcuts

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