types

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// HashLength is the expected length of the hash
	HashLength = 32
	// AddressLength is the expected length of the address
	AddressLength = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address [AddressLength]byte

func BytesToAddress

func BytesToAddress(b []byte) Address

func HexToAddress

func HexToAddress(s string) Address

func (Address) Bytes

func (a Address) Bytes() []byte

func (*Address) SetBytes

func (a *Address) SetBytes(b []byte)

type Hash

type Hash [HashLength]byte

func BigToHash

func BigToHash(b *big.Int) Hash

func BytesToHash

func BytesToHash(b []byte) Hash

func HexToHash

func HexToHash(s string) Hash

func (Hash) Bytes

func (h Hash) Bytes() []byte

func (*Hash) SetBytes

func (h *Hash) SetBytes(b []byte)

type Transaction

type Transaction struct {
	Nonce     uint64  `json:"nonce"`
	Value     big.Int `json:"value"`
	To        string  `json:"to"`
	Data      []byte  `json:"data"`
	GasPrice  big.Int `json:"gasPrice"`
	GasLimit  uint64  `json:"gasLimit"`
	Signature []byte  `json:"signature"`
}

func NewTransaction

func NewTransaction(nonce uint64, to string, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *Transaction

Jump to

Keyboard shortcuts

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