adt

package
v0.10.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array interface {
	Root() (cid.Cid, error)

	Set(idx uint64, v cbor.Marshaler) error
	Get(idx uint64, v cbor.Unmarshaler) (bool, error)
	Delete(idx uint64) error
	Length() uint64

	ForEach(v cbor.Unmarshaler, fn func(idx int64) error) error
}

type Map

type Map interface {
	Root() (cid.Cid, error)

	Put(k abi.Keyer, v cbor.Marshaler) error
	Get(k abi.Keyer, v cbor.Unmarshaler) (bool, error)
	Delete(k abi.Keyer) error

	ForEach(v cbor.Unmarshaler, fn func(key string) error) error
}

type MapHashFunc

type MapHashFunc func([]byte) []byte
var Map0ShaHashFunc MapHashFunc = func(input []byte) []byte {
	res := sha256simd.Sum256(input)
	return res[:]
}
var Map2ShaHashFunc MapHashFunc = func(input []byte) []byte {
	res := sha256.Sum256(input)
	return res[:]
}

type MapOpts

type MapOpts struct {
	Bitwidth int
	HashFunc MapHashFunc
}

func MapOptsForActorCode

func MapOptsForActorCode(c cid.Cid) (*MapOpts, error)

func (*MapOpts) Equal

func (m *MapOpts) Equal(o *MapOpts) bool

type Store

type Store interface {
	Context() context.Context
	cbor.IpldStore
}

func WrapStore

func WrapStore(ctx context.Context, store cbor.IpldStore) Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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