Documentation ¶
Index ¶
- Constants
- func AddressesToStrings(addrs []address.Address) []string
- func AddressesToStringsShort(addrs []address.Address) []string
- func BalanceOfColor(bals []*balance.Balance, color balance.Color) int64
- func BalancesByColor(outs map[valuetransaction.ID][]*balance.Balance) (map[balance.Color]int64, int64)
- func BalancesHash(outs map[valuetransaction.ID][]*balance.Balance) *hashing.HashValue
- func BalancesSumTotal(bals []*balance.Balance) int64
- func BalancesToString(outs map[valuetransaction.ID][]*balance.Balance) string
- func Bytes(obj interface{ ... }) ([]byte, error)
- func CloneBalances(bals []*balance.Balance) []*balance.Balance
- func ColorFromBytes(cb []byte) (ret balance.Color, err error)
- func ColorFromString(cs string) (ret balance.Color, err error)
- func ContainsDuplicates(lst []string) bool
- func ContainsInList(elem string, lst []string) bool
- func DbGetMulti(store kvstore.KVStore, keys [][]byte) ([][]byte, error)
- func DbSetMulti(store kvstore.KVStore, keys [][]byte, values [][]byte) error
- func GetHashValue(obj interface{ ... }) hashing.HashValue
- func InputBalancesToString(outs map[valuetransaction.OutputID][]*balance.Balance) string
- func InputsToStringByAddress(inputs *valuetransaction.Inputs) string
- func IntersectsLists(lst1, lst2 []string) bool
- func MustBytes(obj interface{ ... }) []byte
- func NanoSecToUnixSec(ts int64) uint32
- func OutputBalancesByColor(outs map[valuetransaction.OutputID][]*balance.Balance) (map[balance.Color]int64, int64)
- func RandomColor() (ret balance.Color)
- func RandomTransactionID() (ret valuetransaction.ID)
- func ReadAddress(r io.Reader, addr *address.Address) error
- func ReadBoolByte(r io.Reader, cond *bool) error
- func ReadByte(r io.Reader) (byte, error)
- func ReadBytes16(r io.Reader) ([]byte, error)
- func ReadBytes32(r io.Reader) ([]byte, error)
- func ReadColor(r io.Reader, color *balance.Color) error
- func ReadHashValue(r io.Reader, h *hashing.HashValue) error
- func ReadInt64(r io.Reader, pval *int64) error
- func ReadString16(r io.Reader) (string, error)
- func ReadStrings16(r io.Reader) ([]string, error)
- func ReadTime(r io.Reader, ts *time.Time) error
- func ReadTransactionId(r io.Reader, txid *transaction.ID) error
- func ReadUint16(r io.Reader, pval *uint16) error
- func ReadUint32(r io.Reader, pval *uint32) error
- func ReadUint64(r io.Reader, pval *uint64) error
- func Short(s string) string
- func TimeNowUnix() uint32
- func TransactionIDFromString(s string) (ret valuetransaction.ID, err error)
- func Uint16From2Bytes(b []byte) uint16
- func Uint16InList(v uint16, lst []uint16) bool
- func Uint16To2Bytes(val uint16) []byte
- func Uint32From4Bytes(b []byte) uint32
- func Uint32To4Bytes(val uint32) []byte
- func Uint64From8Bytes(b []byte) uint64
- func Uint64To8Bytes(val uint64) []byte
- func UnixAfterSec(sec int) uint32
- func ValidPermutation(perm []uint16) bool
- func WriteBoolByte(w io.Writer, cond bool) error
- func WriteByte(w io.Writer, val byte) error
- func WriteBytes16(w io.Writer, data []byte) error
- func WriteBytes32(w io.Writer, data []byte) error
- func WriteInt64(w io.Writer, val int64) error
- func WriteSequence16(w io.Writer, num int, elemFun func(i int) interface{ ... }) error
- func WriteString16(w io.Writer, str string) error
- func WriteStrings16(w io.Writer, strs []string) error
- func WriteTime(w io.Writer, ts time.Time) error
- func WriteUint16(w io.Writer, val uint16) error
- func WriteUint32(w io.Writer, val uint32) error
- func WriteUint64(w io.Writer, val uint64) error
- type Permutation16
Constants ¶
View Source
const MaxUint16 = int(^uint16(0))
Variables ¶
This section is empty.
Functions ¶
func AddressesToStrings ¶
func AddressesToStringsShort ¶
func BalancesByColor ¶
func BalancesHash ¶
BalancesHash calculates deterministic hash of address balances
func BalancesSumTotal ¶
func BalancesToString ¶
func BalancesToString(outs map[valuetransaction.ID][]*balance.Balance) string
func ContainsDuplicates ¶
func ContainsInList ¶
func InputBalancesToString ¶
func InputBalancesToString(outs map[valuetransaction.OutputID][]*balance.Balance) string
func InputsToStringByAddress ¶
func InputsToStringByAddress(inputs *valuetransaction.Inputs) string
func IntersectsLists ¶
func NanoSecToUnixSec ¶
func OutputBalancesByColor ¶
func RandomColor ¶
func RandomTransactionID ¶
func RandomTransactionID() (ret valuetransaction.ID)
func ReadTransactionId ¶
func ReadTransactionId(r io.Reader, txid *transaction.ID) error
func TimeNowUnix ¶
func TimeNowUnix() uint32
func TransactionIDFromString ¶
func TransactionIDFromString(s string) (ret valuetransaction.ID, err error)
func Uint16From2Bytes ¶
func Uint16InList ¶
func Uint16To2Bytes ¶
func Uint32From4Bytes ¶
func Uint32To4Bytes ¶
func Uint64From8Bytes ¶
func Uint64To8Bytes ¶
func UnixAfterSec ¶
func ValidPermutation ¶
func WriteSequence16 ¶
Types ¶
type Permutation16 ¶
type Permutation16 struct {
// contains filtered or unexported fields
}
deterministic permutation of integers from 0 to size-1
func NewPermutation16 ¶
func NewPermutation16(size uint16, seed []byte) *Permutation16
func (*Permutation16) Current ¶
func (perm *Permutation16) Current() uint16
func (*Permutation16) GetArray ¶
func (perm *Permutation16) GetArray() []uint16
func (*Permutation16) Next ¶
func (perm *Permutation16) Next() uint16
func (*Permutation16) Shuffle ¶
func (perm *Permutation16) Shuffle(seed []byte) *Permutation16
Source Files ¶
Click to show internal directories.
Click to hide internal directories.