Versions in this module Expand all Collapse all v0 v0.7.1 Sep 14, 2022 v0.7.0 Jul 8, 2022 Changes in this version + const BmtBranches + const Branches + const ChunkSize + const ChunkWithSpanSize + const EncryptedBranches + const ExtendedPO + const HashSize + const MaxBins + const MaxPO + const SectionSize + const SpanSize + var ErrInvalidChunk = errors.New("invalid chunk") + var NewHasher = sha3.NewLegacyKeccak256 + var ZeroAddress = NewAddress(nil) + func Distance(x, y []byte) (*big.Int, error) + func DistanceCmp(a, x, y []byte) (int, error) + func DistanceRaw(x, y []byte) ([]byte, error) + func ExtendedProximity(one, other []byte) (ret uint8) + func Proximity(one, other []byte) (ret uint8) + type Address struct + func MustParseHexAddress(s string) Address + func NewAddress(b []byte) Address + func ParseHexAddress(s string) (a Address, err error) + func (a *Address) UnmarshalJSON(b []byte) (err error) + func (a Address) ByteString() string + func (a Address) Bytes() []byte + func (a Address) Equal(b Address) bool + func (a Address) IsZero() bool + func (a Address) MarshalJSON() ([]byte, error) + func (a Address) MemberOf(addrs []Address) bool + func (a Address) String() string + func (x Address) Closer(a Address, y Address) (bool, error) + type AddressIterFunc func(address Address) error + type Chunk interface + Address func() Address + BucketDepth func() uint8 + Data func() []byte + Depth func() uint8 + Equal func(Chunk) bool + Immutable func() bool + Radius func() uint8 + Stamp func() Stamp + TagID func() uint32 + WithBatch func(radius, depth, bucketDepth uint8, immutable bool) Chunk + WithStamp func(Stamp) Chunk + WithTagID func(t uint32) Chunk + func NewChunk(addr Address, data []byte) Chunk + type Stamp interface + BatchID func() []byte + Index func() []byte + Sig func() []byte + Timestamp func() []byte + type Validator interface + Validate func(ch Chunk) (valid bool) + type ValidatorWithCallback interface + ValidWithCallback func(ch Chunk) (valid bool, callback func()) + func NewMultiValidator(validators []Validator, callbacks ...func(Chunk)) ValidatorWithCallback