common

package
v0.0.1-3-g2e5d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 10 Imported by: 0 modules, 0 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 UINT168SIZE = 21

This is a magical change of Uint168, with length from 20 to 21. In fact, It is UINT168 now.

View Source
const UINT256SIZE int = 32

Variables

This section is empty.

Functions

func BytesReverse

func BytesReverse(u []byte) []byte

func BytesToHexString

func BytesToHexString(data []byte) string

func CompareHeight

func CompareHeight(blockHeight uint64, heights []uint64) bool

func GetUint16Array

func GetUint16Array(source []byte) ([]uint16, error)

func HexStringToBytes

func HexStringToBytes(value string) ([]byte, error)

func HexStringToBytesReverse

func HexStringToBytesReverse(value string) ([]byte, error)

func ToByteArray

func ToByteArray(source []uint16) []byte

Types

type Fixed64

type Fixed64 int64

the 64 bit fixed-point number, precise 10^-8

func (*Fixed64) Deserialize

func (f *Fixed64) Deserialize(r io.Reader) error

func (Fixed64) GetData

func (f Fixed64) GetData() int64

func (*Fixed64) Serialize

func (f *Fixed64) Serialize(w io.Writer) error

func (Fixed64) String

func (f Fixed64) String() string

type Uint168

type Uint168 [UINT168SIZE]uint8

func ToCodeHash added in v0.2.2

func ToCodeHash(code []byte, signType int) (Uint168, error)

func ToScriptHash

func ToScriptHash(address string) (Uint168, error)

func Uint168ParseFromBytes

func Uint168ParseFromBytes(f []byte) (Uint168, error)

func (*Uint168) CompareTo

func (u *Uint168) CompareTo(o Uint168) int

func (*Uint168) Deserialize

func (f *Uint168) Deserialize(r io.Reader) error

func (*Uint168) Serialize

func (u *Uint168) Serialize(w io.Writer) (int, error)

func (*Uint168) ToAddress

func (f *Uint168) ToAddress() (string, error)

func (*Uint168) ToArray

func (u *Uint168) ToArray() []byte

func (*Uint168) ToArrayReverse

func (u *Uint168) ToArrayReverse() []byte

type Uint256

type Uint256 [UINT256SIZE]uint8

func Uint256ParseFromBytes

func Uint256ParseFromBytes(f []byte) (Uint256, error)

func (*Uint256) CompareTo

func (u *Uint256) CompareTo(o Uint256) int

func (*Uint256) Deserialize

func (u *Uint256) Deserialize(r io.Reader) error

func (*Uint256) Serialize

func (u *Uint256) Serialize(w io.Writer) (int, error)

func (*Uint256) ToArray

func (u *Uint256) ToArray() []byte

func (*Uint256) ToArrayReverse

func (u *Uint256) ToArrayReverse() []byte

func (*Uint256) ToString added in v0.0.3

func (u *Uint256) ToString() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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