ethereum

package
v0.0.78 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Goerli network name.
	Goerli = "goerli"
	// Kovan network name.
	Kovan = "kovan"
	// Mainnet network name.
	Mainnet = "mainnet"
	// Rinkeby network name.
	Rinkeby = "rinkeby"
	// Ropsten network name.
	Ropsten = "ropsten"
)

Ethereum

Variables

This section is empty.

Functions

func Address

func Address(pubKey crypto.PublicKey) ([]byte, error)

Address returns the byte representation of the address

func GetPublicKeyFromTransaction

func GetPublicKeyFromTransaction(r, s, v *big.Int, to, input []byte, nonce uint64, gasPrice *big.Int, gas uint64, value *big.Int) ([]byte, error)

GetPublicKeyFromTransaction retrieve the public key from the transaction information

func Keccak256

func Keccak256(data ...[]byte) []byte

Keccak256 calculates and returns the Keccak256 hash of the input data.

func Networks

func Networks() []string

Networks supported by ethereum package.

Types

type Signer

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

Signer for ethereum.

func NewSigner

func NewSigner(privateKey crypto.PrivateKey) (*Signer, error)

NewSigner returns a new ethereum signer that can be used to sign transactions.

func (Signer) Sign

func (e Signer) Sign(opts signer.Options) (signedTransaction interface{}, err error)

Sign an ethereum transaction with the private key.

type SignerOptions

type SignerOptions struct {
	Tx      *types.Transaction
	ChainID *big.Int
}

SignerOptions options that can be set when signing an ethereum transaction.

Jump to

Keyboard shortcuts

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