eth

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tx

type Tx struct {
	AccountNonce uint64    `json:"nonce"    gencodec:"required"`
	Price        *big.Int  `json:"gasPrice" gencodec:"required"`
	GasLimit     *big.Int  `json:"gas"      gencodec:"required"`
	Recipient    *[20]byte `json:"to"       rlp:"nil"` // nil means contract creation
	Amount       *big.Int  `json:"value"    gencodec:"required"`
	Payload      []byte    `json:"input"    gencodec:"required"`
	V            *big.Int  `json:"v" gencodec:"required"`
	R            *big.Int  `json:"r" gencodec:"required"`
	S            *big.Int  `json:"s" gencodec:"required"`
}

Tx .

func New added in v0.0.6

func New(nonce uint64, to string, amount, gasPrice *fixed.Number, gasLimit *big.Int, data []byte) *Tx

New create new eth tx

func (*Tx) Encode

func (tx *Tx) Encode() ([]byte, error)

Encode .

func (*Tx) Hash

func (tx *Tx) Hash() string

Hash get tx hash string

func (*Tx) Sign

func (tx *Tx) Sign(signF func([]byte) ([]byte, error)) (string, error)

Sign .

Jump to

Keyboard shortcuts

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