TON SDK Documentation - v15.3.1duck0.0.3
    Preparing search index...

    Class Cell

    Cell as described in TVM spec

    Index

    Constructors

    • Parameters

      • Optionalopts: { bits?: BitString; exotic?: boolean; refs?: Cell[] }

      Returns Cell

    Properties

    "[SymbolInspect]": () => string
    beginParse: (allowExotic?: boolean) => Slice

    Beging cell parsing

    Type declaration

      • (allowExotic?: boolean): Slice
      • Parameters

        • OptionalallowExotic: boolean

        Returns Slice

        a new slice

    bits: BitString
    depth: (level?: number) => number

    Get cell depth

    Type declaration

      • (level?: number): number
      • Parameters

        • Optionallevel: number

          level

        Returns number

        cell depth

    equals: (other: Cell) => boolean

    Checks cell to be euqal to another cell

    Type declaration

      • (other: Cell): boolean
      • Parameters

        • other: Cell

          other cell

        Returns boolean

        true if cells are equal

    hash: (level?: number) => Buffer

    Get cell hash

    Type declaration

      • (level?: number): Buffer
      • Parameters

        • Optionallevel: number

          level

        Returns Buffer

        cell hash

    level: () => number

    Get cell level

    Type declaration

      • (): number
      • Returns number

        cell level

    mask: LevelMask
    refs: Cell[]
    type: CellType
    EMPTY: Cell

    Accessors

    • get isExotic(): boolean

      Check if cell is exotic

      Returns boolean

    Methods

    • Convert cell to a builder that has this cell stored

      Returns Builder

      builder

    • Covnert cell to slice

      Returns Slice

      slice

    • Serializes cell to BOC

      Parameters

      • Optionalopts: { crc32?: null | boolean; idx?: null | boolean }

        options

      Returns Buffer

    • Format cell to string

      Parameters

      • Optionalindent: 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