Class BitReader

Class for reading bit strings

Hierarchy

  • BitReader

Constructors

  • Parameters

    Returns BitReader

Properties

_bits: any
_checkpoints: any
_loadExternalAddress: any
_loadInternalAddress: any
_offset: any
_preloadBuffer: any
_preloadInt: any

Preload int from specific offset

Param

bits to preload

Param

offset to start from

Returns

read value as bigint

_preloadUint: any

Preload uint from specific offset

Param

bits to preload

Param

offset to start from

Returns

read value as bigint

Accessors

  • get remaining(): number
  • Number of bits remaining

    Returns number

Methods

  • Clone BitReader

    Returns BitReader

  • Load Address

    Returns

    Address

    Returns Address

  • Read address of any type

    Returns

    Address or ExternalAddress or null

    Returns null | Address | ExternalAddress

  • Load a single bit

    Returns

    true if the bit is set, false otherwise

    Returns boolean

  • Load bit string

    Returns

    new bitstring

    Parameters

    • bits: number

      number of bits to read

    Returns BitString

  • Load buffer

    Returns

    new buffer

    Parameters

    • bytes: number

      number of bytes

    Returns Buffer

  • Load coins value

    Returns

    read value as bigint

    Returns bigint

  • Load external address

    Returns

    ExternalAddress

    Returns ExternalAddress

  • Load int value

    Returns

    read value as bigint

    Parameters

    • bits: number

      int bits

    Returns number

  • Load int value as bigint

    Returns

    read value as bigint

    Parameters

    • bits: number

      int bits

    Returns bigint

  • Load internal address

    Returns

    Address or null

    Returns null | Address

  • Load external address

    Returns

    ExternalAddress or null

    Returns null | ExternalAddress

  • Load bit string that was padded to make it byte alligned. Used in BOC serialization

    Parameters

    • bits: number

    Returns BitString

  • Load uint value

    Returns

    read value as number

    Parameters

    • bits: number

      uint bits

    Returns number

  • Load uint value as bigint

    Returns

    read value as bigint

    Parameters

    • bits: number

      uint bits

    Returns bigint

  • Load varint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns number

  • Load varint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns bigint

  • Load varuint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns number

  • Load varuint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns bigint

  • Preload bit

    Returns

    true if the bit is set, false otherwise

    Returns boolean

  • Preload bit string

    Returns

    new bitstring

    Parameters

    • bits: number

      number of bits to read

    Returns BitString

  • Preload buffer

    Returns

    new buffer

    Parameters

    • bytes: number

      number of bytes

    Returns Buffer

  • Preload coins value

    Returns

    read value as bigint

    Returns bigint

  • Preload int value

    Returns

    read value as bigint

    Parameters

    • bits: number

      int bits

    Returns number

  • Preload int value

    Returns

    read value as bigint

    Parameters

    • bits: number

      int bits

    Returns bigint

  • Preload uint value

    Returns

    read value as number

    Parameters

    • bits: number

      uint bits

    Returns number

  • Preload uint value as bigint

    Returns

    read value as bigint

    Parameters

    • bits: number

      uint bits

    Returns bigint

  • Preload varint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns number

  • Preload varint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns bigint

  • Preload varuint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns number

  • Preload varuint value

    Returns

    read value as bigint

    Parameters

    • bits: number

      number of bits to read the size

    Returns bigint

  • Reset to the beginning or latest checkpoint

    Returns void

  • Save checkpoint

    Returns void

  • Skip bits

    Parameters

    • bits: number

      number of bits to skip

    Returns void

Generated using TypeDoc