Class Cell

Cell as described in TVM spec

Constructors

Properties

_depths: number[] = []
_hashes: Buffer[] = []
bits: BitString
mask: LevelMask
refs: Cell[]
type: CellType
EMPTY: Cell = ...

Accessors

Methods

  • Get cell depth

    Parameters

    • level: number = 3

      level

    Returns number

    cell depth

  • Checks cell to be euqal to another cell

    Parameters

    • other: Cell

      other cell

    Returns boolean

    true if cells are equal

  • Get cell hash

    Parameters

    • level: number = 3

      level

    Returns Buffer

    cell hash

  • Serializes cell to BOC

    Parameters

    • Optional opts: {
          crc32?: null | boolean;
          idx?: null | boolean;
      }

      options

      • Optional crc32?: null | boolean
      • Optional idx?: null | boolean

    Returns Buffer

  • Format cell to string

    Parameters

    • Optional indent: string

      indentation

    Returns string

    string representation

  • Helper function that deserializes a single cell from BOC in base64

    Parameters

    • src: string

      source string

    Returns Cell

  • Deserialize cells from BOC

    Parameters

    • src: Buffer

      source buffer

    Returns Cell[]

    array of cells

  • Helper function that deserializes a single cell from BOC in hex

    Parameters

    • src: string

      source string

    Returns Cell