Versions in this module Expand all Collapse all v0 v0.0.6 Aug 25, 2021 v0.0.5 Aug 25, 2021 Changes in this version + const Dms3Key v0.0.4 Aug 23, 2021 Changes in this version type Cid + func CidFromReader(r io.Reader) (int, Cid, error) v0.0.3 Aug 20, 2021 Changes in this version + const BitcoinBlock + const BitcoinTx + const DagCBOR + const DagJOSE + const DagProtobuf + const DashBlock + const DashTx + const DecredBlock + const DecredTx + const EthAccountSnapshot + const EthBlock + const EthBlockList + const EthStateTrie + const EthStorageTrie + const EthTx + const EthTxReceipt + const EthTxReceiptTrie + const EthTxTrie + const FilCommitmentSealed + const FilCommitmentUnsealed + const GitRaw + const P2pKey + const Raw + const UnsupportedVersionString + const ZcashBlock + const ZcashTx + var CodecToStr = map[uint64]string + var Codecs = map[string]uint64 + var ErrCidTooShort = errors.New("cid too short") + var ErrInvalidEncoding = errors.New("invalid base encoding") + var Undef = Cid + func ExtractEncoding(v string) (mbase.Encoding, error) + type Builder interface + GetCodec func() uint64 + Sum func(data []byte) (Cid, error) + WithCodec func(uint64) Builder + type Cid struct + func Cast(data []byte) (Cid, error) + func CidFromBytes(data []byte) (int, Cid, error) + func Decode(v string) (Cid, error) + func NewCidV0(mhash mh.Multihash) Cid + func NewCidV1(codecType uint64, mhash mh.Multihash) Cid + func Parse(v interface{}) (Cid, error) + func (c *Cid) UnmarshalBinary(data []byte) error + func (c *Cid) UnmarshalJSON(b []byte) error + func (c *Cid) UnmarshalText(text []byte) error + func (c Cid) ByteLen() int + func (c Cid) Bytes() []byte + func (c Cid) Defined() bool + func (c Cid) Encode(base mbase.Encoder) string + func (c Cid) Equals(o Cid) bool + func (c Cid) Hash() mh.Multihash + func (c Cid) KeyString() string + func (c Cid) Loggable() map[string]interface{} + func (c Cid) MarshalBinary() ([]byte, error) + func (c Cid) MarshalJSON() ([]byte, error) + func (c Cid) MarshalText() ([]byte, error) + func (c Cid) Prefix() Prefix + func (c Cid) String() string + func (c Cid) StringOfBase(base mbase.Encoding) (string, error) + func (c Cid) Type() uint64 + func (c Cid) Version() uint64 + func (c Cid) WriteBytes(w io.Writer) (int, error) + type Prefix struct + Codec uint64 + MhLength int + MhType uint64 + Version uint64 + func NewPrefixV0(mhType uint64) Prefix + func NewPrefixV1(codecType uint64, mhType uint64) Prefix + func PrefixFromBytes(buf []byte) (Prefix, error) + func (p Prefix) Bytes() []byte + func (p Prefix) GetCodec() uint64 + func (p Prefix) Sum(data []byte) (Cid, error) + func (p Prefix) WithCodec(c uint64) Builder + type Set struct + func NewSet() *Set + func (s *Set) Add(c Cid) + func (s *Set) ForEach(f func(c Cid) error) error + func (s *Set) Has(c Cid) bool + func (s *Set) Keys() []Cid + func (s *Set) Len() int + func (s *Set) Remove(c Cid) + func (s *Set) Visit(c Cid) bool + type V0Builder struct + func (p V0Builder) GetCodec() uint64 + func (p V0Builder) Sum(data []byte) (Cid, error) + func (p V0Builder) WithCodec(c uint64) Builder + type V1Builder struct + Codec uint64 + MhLength int + MhType uint64 + func (p V1Builder) GetCodec() uint64 + func (p V1Builder) Sum(data []byte) (Cid, error) + func (p V1Builder) WithCodec(c uint64) Builder