Documentation ¶
Index ¶
- Constants
- func IsBase58AccountButNotContract(s string) bool
- type AccountAddress
- func (a AccountAddress) Base58() string
- func (a AccountAddress) Big() *big.Int
- func (a AccountAddress) Bytes() []byte
- func (a AccountAddress) Format(s fmt.State, c rune)
- func (a AccountAddress) MarshalText() ([]byte, error)
- func (a *AccountAddress) Scan(src interface{}) error
- func (a *AccountAddress) SetBytes(b []byte)
- func (a AccountAddress) String() string
- func (a AccountAddress) ToUint512() *keys.Uint512
- func (a *AccountAddress) UnmarshalText(input []byte) error
- func (a AccountAddress) Value() (driver.Value, error)
- type Accountes
- type Seed
Constants ¶
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 ¶
func IsBase58AccountButNotContract ¶
IsBase58Account verifies whether a string can represent a valid hex-encoded Ethereum Data or not.
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.
type Accountes ¶
type Accountes []AccountAddress