ethgo

package module
v0.0.0-...-0c64813 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 2 Imported by: 2

README

ethgo

the standalone eth lightweight golang sdk

Documentation

Index

Constants

View Source
const (
	Wei      Unit = 1
	Ada           = 1000 * Wei
	Babbage       = 1000 * Ada
	Shannon       = 1000 * Babbage
	Szabo         = 1000 * Shannon
	Finney        = 1000 * Szabo
	Ether         = 1000 * Finney
	Einstein      = 1000 * Ether
	Douglas       = 1000 * Einstein
)

These are the multipliers for ether denominations. Example: To get the wei value of an amount in 'douglas', use

new(big.Int).Mul(value, big.NewInt(params.Douglas))

Variables

This section is empty.

Functions

func CustomerValue

func CustomerValue(val *big.Int, decimals *big.Int) *big.Float

CustomerValue .

func FromCustomerValue

func FromCustomerValue(val *big.Float, decimals *big.Int) *big.Int

FromCustomerValue .

Types

type Unit

type Unit float64

Unit .

type Value

type Value big.Int

Value .

func NewValue

func NewValue(val *big.Float, unit Unit) *Value

NewValue create new eth value

func (*Value) As

func (value *Value) As(unit Unit) *big.Float

As .

func (*Value) Bytes

func (value *Value) Bytes() []byte

Bytes .

func (*Value) Format

func (value *Value) Format(s fmt.State, format rune)

Format .

Directories

Path Synopsis
Package math provides integer math utilities.
Package math provides integer math utilities.
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.

Jump to

Keyboard shortcuts

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