address

package
v0.9.0-review-3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: GPL-3.0 Imports: 8 Imported by: 13

Documentation

Index

Constants

View Source
const (
	// AccountAddressLength is the expected length of the adddress
	AccountAddressLength = 64
	SeedLength           = 32
)

Lengths of hashes and Accountes in bytes.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAddress

type AccountAddress [AccountAddressLength]byte

Data represents the 64 byte Data of an Ethereum account.

func Base58ToAccount

func Base58ToAccount(s string) AccountAddress

func BigToAccount

func BigToAccount(b *big.Int) AccountAddress

BigToAccount returns Data with byte values of b. If b is larger than len(h), b will be cropped from the left.

func BytesToAccount

func BytesToAccount(b []byte) AccountAddress

If b is larger than len(h), b will be cropped from the left.

func (AccountAddress) Base58

func (a AccountAddress) Base58() string

Base58 returns base58 string representation of the Data.

func (AccountAddress) Big

func (a AccountAddress) Big() *big.Int

Big converts an Data to a big integer.

func (AccountAddress) Bytes

func (a AccountAddress) Bytes() []byte

Bytes gets the string representation of the underlying Data.

func (AccountAddress) Format

func (a AccountAddress) Format(s fmt.State, c rune)

Format implements fmt.Formatter, forcing the byte slice to be formatted as is, without going through the stringer interface used for logging.

func (AccountAddress) MarshalText

func (a AccountAddress) MarshalText() ([]byte, error)

MarshalText returns the hex representation of a.

func (*AccountAddress) Scan

func (a *AccountAddress) Scan(src interface{}) error

Scan implements Scanner for database/sql.

func (*AccountAddress) SetBytes

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

SetBytes sets the Data to the value of b. If b is larger than len(a) it will panic.

func (AccountAddress) String

func (a AccountAddress) String() string

String implements fmt.Stringer.

func (AccountAddress) ToUint512

func (a AccountAddress) ToUint512() *keys.Uint512

func (*AccountAddress) UnmarshalText

func (a *AccountAddress) UnmarshalText(input []byte) error

UnmarshalText parses a hash in hex syntax.

func (AccountAddress) Value

func (a AccountAddress) Value() (driver.Value, error)

Value implements valuer for database/sql.

type Accountes

type Accountes []AccountAddress

func (Accountes) Len

func (self Accountes) Len() int

func (Accountes) Less

func (self Accountes) Less(i, j int) bool

func (Accountes) Swap

func (self Accountes) Swap(i, j int)

type Seed

type Seed [SeedLength]byte

func (*Seed) SeedToUint256

func (priv *Seed) SeedToUint256() *keys.Uint256

Jump to

Keyboard shortcuts

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