Documentation ¶
Index ¶
- Constants
- type Map
- func (m *Map[K, V, KPtr, VPtr]) Delete(key K) (deleted bool)
- func (m *Map[K, V, KPtr, VPtr]) Get(key K) (value VPtr, exists bool)
- func (m *Map[K, V, KPtr, VPtr]) Has(key K) (has bool)
- func (m *Map[K, V, KPtr, VPtr]) Root() (root types.Identifier)
- func (m *Map[K, V, KPtr, VPtr]) Set(key K, value VPtr)
- func (m *Map[K, V, KPtr, VPtr]) Stream(callback func(key K, value VPtr) bool) (err error)
- type Set
Constants ¶
View Source
const ( PrefixRawKeysStorage uint8 = iota PrefixSMTKeysStorage PrefixSMTValuesStorage PrefixRootKey PrefixSizeKey )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K, V serializer.Byter, KPtr serializer.MarshalablePtr[K], VPtr serializer.MarshalablePtr[V]] struct { // contains filtered or unexported fields }
func NewMap ¶
func NewMap[K, V serializer.Byter, KPtr serializer.MarshalablePtr[K], VPtr serializer.MarshalablePtr[V]](store kvstore.KVStore) (newMap *Map[K, V, KPtr, VPtr])
func (*Map[K, V, KPtr, VPtr]) Root ¶
func (m *Map[K, V, KPtr, VPtr]) Root() (root types.Identifier)
Root returns the root of the state sparse merkle tree at the latest committed slot.
type Set ¶
type Set[K any, KPtr serializer.MarshalablePtr[K]] struct { // contains filtered or unexported fields }
Set is a sparse merkle tree based set.
func NewSet ¶
func NewSet[K any, KPtr serializer.MarshalablePtr[K]](store kvstore.KVStore) (newSet *Set[K, KPtr])
NewSet creates a new sparse merkle tree based set.
func (*Set[K, KPtr]) Root ¶
func (s *Set[K, KPtr]) Root() (root types.Identifier)
Root returns the root of the state sparse merkle tree at the latest committed slot.
Click to show internal directories.
Click to hide internal directories.