Documentation ¶
Index ¶
- Constants
- Variables
- func AbsolutePath(Datadir string, filename string) string
- func Bytes2Hex(d []byte) string
- func Bytes2Uint64(b []byte) uint64
- func CopyBytes(b []byte) (copiedBytes []byte)
- func EmptyHash(h Hash) bool
- func FileExist(filePath string) bool
- func FromHex(s string) []byte
- func Hex2Bytes(str string) []byte
- func Hex2BytesFixed(str string, flen int) []byte
- func IsHexAddress(s string) bool
- func LeftPadBytes(slice []byte, l int) []byte
- func LoadJSON(file string, val interface{}) error
- func MakeName(name, version string) string
- func PrintDepricationWarning(str string)
- func Report(extra ...interface{})
- func RightPadBytes(slice []byte, l int) []byte
- func ToHex(b []byte) string
- type Address
- func (a Address) Big() *big.Int
- func (a Address) Bytes() []byte
- func (a Address) Format(s fmt.State, c rune)
- func (a Address) Hash() Hash
- func (a Address) Hex() string
- func (a Address) MarshalText() ([]byte, error)
- func (a *Address) Set(other Address)
- func (a *Address) SetBytes(b []byte)
- func (a *Address) SetString(s string)
- func (a Address) Str() string
- func (a Address) String() string
- func (a *Address) UnmarshalJSON(input []byte) error
- func (a *Address) UnmarshalText(input []byte) error
- type Hash
- func (h Hash) Big() *big.Int
- func (h Hash) Bytes() []byte
- func (h Hash) Format(s fmt.State, c rune)
- func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value
- func (h Hash) Hex() string
- func (h Hash) MarshalText() ([]byte, error)
- func (h *Hash) Set(other Hash)
- func (h *Hash) SetBytes(b []byte)
- func (h *Hash) SetString(s string)
- func (h Hash) Str() string
- func (h Hash) String() string
- func (h Hash) TerminalString() string
- func (h *Hash) UnmarshalJSON(input []byte) error
- func (h *Hash) UnmarshalText(input []byte) error
- type PrettyAge
- type PrettyDuration
- type StorageSize
- type UnprefixedAddress
- type UnprefixedHash
Constants ¶
View Source
const ( HashLength = 32 LigoAddressLength = 32 )
View Source
const INT_SIZE int = int(unsafe.Sizeof(0))
Variables ¶
Functions ¶
func AbsolutePath ¶
func Bytes2Uint64 ¶
func Hex2BytesFixed ¶
func IsHexAddress ¶
func LeftPadBytes ¶
func PrintDepricationWarning ¶
func PrintDepricationWarning(str string)
func RightPadBytes ¶
Types ¶
type Address ¶
type Address [LigoAddressLength]byte
func BigToAddress ¶
func BytesToAddress ¶
func HexToAddress ¶
func StringToAddress ¶
func (Address) MarshalText ¶
func (*Address) UnmarshalJSON ¶
func (*Address) UnmarshalText ¶
type Hash ¶
type Hash [HashLength]byte
func BytesToHash ¶
func StringToHash ¶
func (Hash) MarshalText ¶
func (Hash) TerminalString ¶
func (*Hash) UnmarshalJSON ¶
func (*Hash) UnmarshalText ¶
type PrettyDuration ¶
func (PrettyDuration) String ¶
func (d PrettyDuration) String() string
type StorageSize ¶
type StorageSize float64
func (StorageSize) String ¶
func (s StorageSize) String() string
func (StorageSize) TerminalString ¶
func (s StorageSize) TerminalString() string
type UnprefixedAddress ¶
type UnprefixedAddress Address
func (UnprefixedAddress) MarshalText ¶
func (a UnprefixedAddress) MarshalText() ([]byte, error)
func (*UnprefixedAddress) UnmarshalText ¶
func (a *UnprefixedAddress) UnmarshalText(input []byte) error
type UnprefixedHash ¶
type UnprefixedHash Hash
func (UnprefixedHash) MarshalText ¶
func (h UnprefixedHash) MarshalText() ([]byte, error)
func (*UnprefixedHash) UnmarshalText ¶
func (h *UnprefixedHash) UnmarshalText(input []byte) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.