Versions in this module Expand all Collapse all v1 v1.4.0 Sep 30, 2024 Changes in this version + type Chain struct + func NewChain(logger log.Logger, store record.Store, key *record.Key, markPower int64, ...) *Chain + func (c *Chain) Commit() error + func (c *Chain) Element(index uint64) values.Value[[]byte] + func (c *Chain) ElementIndex(hash []byte) values.Value[uint64] + func (c *Chain) Head() values.Value[*State] + func (c *Chain) IsDirty() bool + func (c *Chain) Key() *record.Key + func (c *Chain) MarkFreq() int64 + func (c *Chain) MarkMask() int64 + func (c *Chain) MarkPower() int64 + func (c *Chain) Name() string + func (c *Chain) Receipt(from, to int64) (*Receipt, error) + func (c *Chain) Resolve(key *record.Key) (record.Record, *record.Key, error) + func (c *Chain) States(index uint64) values.Value[*State] + func (c *Chain) Type() ChainType + func (c *Chain) Walk(opts record.WalkOptions, fn record.WalkFunc) error + func (m *Chain) AddEntry(hash []byte, unique bool) error + func (m *Chain) Entries(begin, end int64) ([][]byte, error) + func (m *Chain) Entry(element int64) ([]byte, error) + func (m *Chain) IndexOf(hash []byte) (int64, error) + func (m *Chain) StateAt(element int64) (ms *State, err error) + type ChainIndex struct + func NewChainIndex(logger log.Logger, store database.Store, key *record.Key) *ChainIndex + func (c *ChainIndex) Commit() error + func (c *ChainIndex) IsDirty() bool + func (c *ChainIndex) Key() *record.Key + func (c *ChainIndex) Resolve(key *record.Key) (record.Record, *record.Key, error) + func (c *ChainIndex) Walk(opts record.WalkOptions, fn record.WalkFunc) error + func (x *ChainIndex) Append(key *record.Key, index uint64) error + func (x *ChainIndex) Find(target *record.Key) ChainSearchResult + func (x *ChainIndex) Last() (*record.Key, uint64, error) + type ChainSearchResult interface + After func() ChainSearchResult2 + Before func() ChainSearchResult2 + Exact func() ChainSearchResult2 + type ChainSearchResult2 interface + Err func() error + Index func() (uint64, error) + type ChainType uint64 + const ChainTypeAnchor + const ChainTypeIndex + const ChainTypeTransaction + const ChainTypeUnknown + func ChainTypeByName(name string) (ChainType, bool) + func (v *ChainType) SetEnumValue(id uint64) bool + func (v *ChainType) UnmarshalJSON(data []byte) error + func (v ChainType) GetEnumValue() uint64 + func (v ChainType) MarshalJSON() ([]byte, error) + func (v ChainType) String() string + type Hasher [][]byte + func (h *Hasher) AddBigInt(v *big.Int) + func (h *Hasher) AddBool(v bool) + func (h *Hasher) AddBytes(v []byte) + func (h *Hasher) AddDuration(v time.Duration) + func (h *Hasher) AddEnum(v interface{ ... }) + func (h *Hasher) AddHash(v *[32]byte) + func (h *Hasher) AddHash2(v [32]byte) + func (h *Hasher) AddInt(v int64) + func (h *Hasher) AddString(v string) + func (h *Hasher) AddTime(v time.Time) + func (h *Hasher) AddTxID(v *url.TxID) + func (h *Hasher) AddUint(v uint64) + func (h *Hasher) AddUrl(v *url.URL) + func (h *Hasher) AddUrl2(v *url.URL) + func (h *Hasher) AddValue(v interface{ ... }) + func (h Hasher) MerkleHash() []byte + func (h Hasher) Receipt(start, anchor int) *Receipt + type Receipt struct + Anchor []byte + End []byte + EndIndex int64 + Entries []*ReceiptEntry + Start []byte + StartIndex int64 + func (r *Receipt) Combine(receipts ...*Receipt) (*Receipt, error) + func (r *Receipt) Contains(other *Receipt) bool + func (r *Receipt) Validate(opts *ValidateOptions) bool + func (v *Receipt) Copy() *Receipt + func (v *Receipt) CopyAsInterface() interface{} + func (v *Receipt) Equal(u *Receipt) bool + func (v *Receipt) IsValid() error + func (v *Receipt) MarshalBinary() ([]byte, error) + func (v *Receipt) MarshalJSON() ([]byte, error) + func (v *Receipt) UnmarshalBinary(data []byte) error + func (v *Receipt) UnmarshalBinaryFrom(rd io.Reader) error + func (v *Receipt) UnmarshalJSON(data []byte) error + type ReceiptEntry struct + Hash []byte + Right bool + func (v *ReceiptEntry) Copy() *ReceiptEntry + func (v *ReceiptEntry) CopyAsInterface() interface{} + func (v *ReceiptEntry) Equal(u *ReceiptEntry) bool + func (v *ReceiptEntry) IsValid() error + func (v *ReceiptEntry) MarshalBinary() ([]byte, error) + func (v *ReceiptEntry) MarshalJSON() ([]byte, error) + func (v *ReceiptEntry) UnmarshalBinary(data []byte) error + func (v *ReceiptEntry) UnmarshalBinaryFrom(rd io.Reader) error + func (v *ReceiptEntry) UnmarshalJSON(data []byte) error + type ReceiptList struct + ContinuedReceipt *Receipt + Elements [][]byte + MerkleState *State + Receipt *Receipt + func GetReceiptList(manager *Chain, Start int64, End int64) (r *ReceiptList, err error) + func NewReceiptList() *ReceiptList + func (r *ReceiptList) Included(entry []byte) bool + func (r *ReceiptList) Validate(opts *ValidateOptions) bool + func (v *ReceiptList) Copy() *ReceiptList + func (v *ReceiptList) CopyAsInterface() interface{} + func (v *ReceiptList) Equal(u *ReceiptList) bool + func (v *ReceiptList) IsValid() error + func (v *ReceiptList) MarshalBinary() ([]byte, error) + func (v *ReceiptList) MarshalJSON() ([]byte, error) + func (v *ReceiptList) UnmarshalBinary(data []byte) error + func (v *ReceiptList) UnmarshalBinaryFrom(rd io.Reader) error + func (v *ReceiptList) UnmarshalJSON(data []byte) error + type State struct + Count int64 + HashList [][]byte + Pending [][]byte + func (m *State) AddEntry(hash_ []byte) + func (m *State) Anchor() (anchor []byte) + func (m *State) Equal(m2 *State) (isEqual bool) + func (m *State) MarshalBinary() ([]byte, error) + func (m *State) UnmarshalBinary(data []byte) error + func (m *State) UnmarshalBinaryFrom(rd io.Reader) error + func (v *State) Copy() *State + func (v *State) CopyAsInterface() interface{} + func (v *State) MarshalJSON() ([]byte, error) + func (v *State) UnmarshalJSON(data []byte) error + type ValidateOptions struct + Relaxed bool v1.4.0-alpha.1 Apr 2, 2024