Class Slice

Slice is a class that allows to read cell data

Constructors

Properties

_reader: BitReader
_refs: Cell[]
_refsOffset: number

Accessors

Methods

  • Load a single bit

    Returns boolean

    true or false depending on the bit value

  • Load a boolean

    Returns boolean

    true or false depending on the bit value

  • Load byte buffer

    Parameters

    • bytes: number

      number of bytes to load

    Returns Buffer

    Buffer

  • Load int

    Parameters

    • bits: number

      number of bits to read

    Returns number

    int value

  • Load int

    Parameters

    • bits: number

      number of bits to read

    Returns bigint

    int value

  • Load maybe boolean

    Returns null | boolean

    true or false depending on the bit value or null

  • Load maybe coins

    Returns null | bigint

    coins value or null

  • Load maybe uint

    Parameters

    • bits: number

      number of bits to read

    Returns null | number

    uint value or null

  • Load maybe uint

    Parameters

    • bits: number

      number of bits to read

    Returns null | bigint

    uint value or null

  • Load maybe string tail from ref

    Returns null | string

    string or null

  • Load maybe string tail

    Returns null | string

    string or null

  • Load maybe uint

    Parameters

    • bits: number

      number of bits to read

    Returns null | number

    uint value or null

  • Load maybe uint

    Parameters

    • bits: number

      number of bits to read

    Returns null | bigint

    uint value or null

  • Load string tail from ref

    Returns string

    string

  • Load uint

    Parameters

    • bits: number

      number of bits to read

    Returns number

    uint value

  • Load uint

    Parameters

    • bits: number

      number of bits to read

    Returns bigint

    uint value

  • Load varint

    Parameters

    • bits: number

      number of bits to read in header

    Returns number

    varint value

  • Load varint

    Parameters

    • bits: number

      number of bits to read in header

    Returns bigint

    varint value

  • Load varuint

    Parameters

    • bits: number

      number of bits to read in header

    Returns number

    varuint value

  • Load varuint

    Parameters

    • bits: number

      number of bits to read in header

    Returns bigint

    varuint value

  • Preload a signle bit

    Returns boolean

    true or false depending on the bit value

  • Load byte buffer

    Parameters

    • bytes: number

      number of bytes to load

    Returns Buffer

    Buffer

  • Preload int

    Parameters

    • bits: number

      number of bits to read

    Returns number

    int value

  • Preload int

    Parameters

    • bits: number

      number of bits to read

    Returns bigint

    int value

  • Preload uint

    Parameters

    • bits: number

      number of bits to read

    Returns number

    uint value

  • Preload uint

    Parameters

    • bits: number

      number of bits to read

    Returns bigint

    uint value

  • Preload varint

    Parameters

    • bits: number

      number of bits to read in header

    Returns number

    varint value

  • Preload varint

    Parameters

    • bits: number

      number of bits to read in header

    Returns bigint

    varint value

  • Preload varuint

    Parameters

    • bits: number

      number of bits to read in header

    Returns number

    varuint value

  • Preload varuint

    Parameters

    • bits: number

      number of bits to read in header

    Returns bigint

    varuint value

  • Print slice as string by converting it to cell

    Returns string

    string