cell

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 13 Imported by: 50

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErNotFit1024 = errors.New("cell data size should fit into 1024 bits")
View Source
var ErrNoMoreRefs = errors.New("no more refs exists")
View Source
var ErrNotEnoughData = errors.New("not enough data in reader")
View Source
var ErrSmallSlice = errors.New("too small slice for this size")
View Source
var ErrTooBigSize = errors.New("too big size")
View Source
var ErrTooBigValue = errors.New("too big value")
View Source
var ErrTooMuchRefs = errors.New("too much refs")

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func BeginCell

func BeginCell() *Builder

func (*Builder) BitsLeft added in v0.6.0

func (b *Builder) BitsLeft() int

func (*Builder) BitsUsed added in v0.5.0

func (b *Builder) BitsUsed() int

func (*Builder) Copy added in v0.5.0

func (b *Builder) Copy() *Builder

func (*Builder) EndCell

func (b *Builder) EndCell() *Cell

func (*Builder) MustStoreAddr added in v0.4.0

func (b *Builder) MustStoreAddr(addr *address.Address) *Builder

func (*Builder) MustStoreBigCoins

func (b *Builder) MustStoreBigCoins(value *big.Int) *Builder

func (*Builder) MustStoreBigInt

func (b *Builder) MustStoreBigInt(value *big.Int, sz int) *Builder

func (*Builder) MustStoreBoolBit added in v0.6.0

func (b *Builder) MustStoreBoolBit(value bool) *Builder

func (*Builder) MustStoreBuilder added in v0.6.0

func (b *Builder) MustStoreBuilder(builder *Builder) *Builder

func (*Builder) MustStoreCoins

func (b *Builder) MustStoreCoins(value uint64) *Builder

func (*Builder) MustStoreMaybeRef added in v0.7.0

func (b *Builder) MustStoreMaybeRef(ref *Cell) *Builder

func (*Builder) MustStoreRef

func (b *Builder) MustStoreRef(ref *Cell) *Builder

func (*Builder) MustStoreSlice

func (b *Builder) MustStoreSlice(bytes []byte, sz int) *Builder

func (*Builder) MustStoreUInt

func (b *Builder) MustStoreUInt(value uint64, sz int) *Builder

func (*Builder) RefsLeft added in v0.6.0

func (b *Builder) RefsLeft() int

func (*Builder) RefsUsed added in v0.6.0

func (b *Builder) RefsUsed() int

func (*Builder) StoreAddr added in v0.4.0

func (b *Builder) StoreAddr(addr *address.Address) error

func (*Builder) StoreBigCoins

func (b *Builder) StoreBigCoins(value *big.Int) error

func (*Builder) StoreBigInt

func (b *Builder) StoreBigInt(value *big.Int, sz int) error

func (*Builder) StoreBoolBit added in v0.6.0

func (b *Builder) StoreBoolBit(value bool) error

func (*Builder) StoreBuilder added in v0.6.0

func (b *Builder) StoreBuilder(builder *Builder) error

func (*Builder) StoreCoins

func (b *Builder) StoreCoins(value uint64) error

func (*Builder) StoreMaybeRef added in v0.7.0

func (b *Builder) StoreMaybeRef(ref *Cell) error

func (*Builder) StoreRef

func (b *Builder) StoreRef(ref *Cell) error

func (*Builder) StoreSlice

func (b *Builder) StoreSlice(bytes []byte, sz int) error

func (*Builder) StoreUInt

func (b *Builder) StoreUInt(value uint64, sz int) error

type Cell

type Cell struct {
	// contains filtered or unexported fields
}

func FromBOC

func FromBOC(data []byte) (*Cell, error)

func FromBOCMultiRoot added in v0.5.0

func FromBOCMultiRoot(data []byte) ([]*Cell, error)

func (*Cell) BeginParse

func (c *Cell) BeginParse() *LoadCell

func (*Cell) BitsSize added in v0.6.0

func (c *Cell) BitsSize() int

func (*Cell) Dump added in v0.1.2

func (c *Cell) Dump() string

func (*Cell) DumpBits added in v0.5.0

func (c *Cell) DumpBits() string

func (*Cell) Hash added in v0.5.0

func (c *Cell) Hash() []byte

func (*Cell) RefsNum added in v0.6.0

func (c *Cell) RefsNum() int

func (*Cell) Sign added in v0.6.0

func (c *Cell) Sign(key ed25519.PrivateKey) []byte

func (*Cell) ToBOC

func (c *Cell) ToBOC() []byte

func (*Cell) ToBOCWithFlags

func (c *Cell) ToBOCWithFlags(withCRC bool) []byte

func (*Cell) ToBuilder added in v0.6.0

func (c *Cell) ToBuilder() *Builder

type Dictionary added in v0.5.0

type Dictionary struct {
	// contains filtered or unexported fields
}

func (*Dictionary) All added in v0.5.0

func (d *Dictionary) All() []*HashmapKV

func (*Dictionary) Get added in v0.5.0

func (d *Dictionary) Get(key *Cell) *Cell

type HashmapKV added in v0.5.0

type HashmapKV struct {
	Key   *Cell
	Value *Cell
}

type LoadCell

type LoadCell struct {
	// contains filtered or unexported fields
}

func (*LoadCell) BitsLeft added in v0.5.0

func (c *LoadCell) BitsLeft() int

func (*LoadCell) Copy added in v0.5.0

func (c *LoadCell) Copy() *LoadCell

func (*LoadCell) LoadAddr added in v0.1.8

func (c *LoadCell) LoadAddr() (*address.Address, error)

func (*LoadCell) LoadBigCoins

func (c *LoadCell) LoadBigCoins() (*big.Int, error)

func (*LoadCell) LoadBigInt

func (c *LoadCell) LoadBigInt(sz int) (*big.Int, error)

func (*LoadCell) LoadBoolBit added in v0.5.0

func (c *LoadCell) LoadBoolBit() (bool, error)

func (*LoadCell) LoadCoins

func (c *LoadCell) LoadCoins() (uint64, error)

func (*LoadCell) LoadDict added in v0.5.0

func (c *LoadCell) LoadDict(keySz int) (*Dictionary, error)

func (*LoadCell) LoadMaybeRef added in v0.7.1

func (c *LoadCell) LoadMaybeRef() (*LoadCell, error)

func (*LoadCell) LoadRef

func (c *LoadCell) LoadRef() (*LoadCell, error)

func (*LoadCell) LoadSlice

func (c *LoadCell) LoadSlice(sz int) ([]byte, error)

func (*LoadCell) LoadUInt

func (c *LoadCell) LoadUInt(sz int) (uint64, error)

func (*LoadCell) LoadVarUInt added in v0.3.0

func (c *LoadCell) LoadVarUInt(sz int) (*big.Int, error)

func (*LoadCell) MustLoadAddr added in v0.7.0

func (c *LoadCell) MustLoadAddr() *address.Address

func (*LoadCell) MustLoadBigCoins added in v0.7.1

func (c *LoadCell) MustLoadBigCoins() *big.Int

func (*LoadCell) MustLoadBigInt added in v0.7.1

func (c *LoadCell) MustLoadBigInt(sz int) *big.Int

func (*LoadCell) MustLoadBoolBit added in v0.7.1

func (c *LoadCell) MustLoadBoolBit() bool

func (*LoadCell) MustLoadCoins added in v0.7.1

func (c *LoadCell) MustLoadCoins() uint64

func (*LoadCell) MustLoadMaybeRef added in v0.7.1

func (c *LoadCell) MustLoadMaybeRef() *LoadCell

func (*LoadCell) MustLoadRef added in v0.5.0

func (c *LoadCell) MustLoadRef() *LoadCell

func (*LoadCell) MustLoadSlice added in v0.5.0

func (c *LoadCell) MustLoadSlice(sz int) []byte

func (*LoadCell) MustLoadUInt added in v0.4.0

func (c *LoadCell) MustLoadUInt(sz int) uint64

func (*LoadCell) MustToCell added in v0.5.0

func (c *LoadCell) MustToCell() *Cell

func (*LoadCell) RefsNum added in v0.5.0

func (c *LoadCell) RefsNum() int

func (*LoadCell) RestBits

func (c *LoadCell) RestBits() (int, []byte, error)

func (*LoadCell) ToCell added in v0.1.2

func (c *LoadCell) ToCell() (*Cell, error)

Jump to

Keyboard shortcuts

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