geth

package
v0.0.0-...-65055fe Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mainnet = "mainnet"
	Rinkeby = "rinkeby"
	Ropsten = "ropsten"

	Ifr = "infura"
)

Variables

View Source
var Infura *infura
View Source
var InfuraEnv = map[string]string{
	Mainnet: "mainnet",
	Rinkeby: "rinkeby",
	Ropsten: "ropsten",
}

Functions

func GetAddressByPrivateKey

func GetAddressByPrivateKey(privateKey *ecdsa.PrivateKey) (address string, err error)

func GetPriaveKeyByEcdsa

func GetPriaveKeyByEcdsa(privateKey *ecdsa.PrivateKey) (privateKeyStr string)

func Init

func Init(platform Platform) (err error)

func InitInfura

func InitInfura(key, env string) *infura

func NewPrivateKey

func NewPrivateKey() (privateKey *ecdsa.PrivateKey, err error)

Types

type Geth

type Geth struct {
	Cli *ethclient.Client
}

func Get

func Get() *Geth

func (*Geth) AddressIsContract

func (G *Geth) AddressIsContract(address string) (isContract bool, err error)

func (*Geth) GetBalance

func (G *Geth) GetBalance(address string) (balance *big.Int, err error)

type Platform

type Platform interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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