Class Builder

Builder for Cells

Hierarchy

  • Builder

Constructors

  • Returns Builder

Properties

_bits: any
_refs: any

Accessors

  • get availableBits(): number
  • Available bits

    Returns number

  • get availableRefs(): number
  • Available references

    Returns number

  • get bits(): number
  • Bits written so far

    Returns number

  • get refs(): number
  • References written so far

    Returns number

Methods

  • Convert to cell

    Returns

    cell

    Returns Cell

  • Convert to slice

    Returns

    slice

    Returns Slice

  • Complete cell

    Returns

    cell

    Returns Cell

  • Store object in this builder

    Parameters

    • writer: ((builder: Builder) => void) | Writable

      Writable or writer functuin

    Returns Builder

  • Write a single bit

    Returns

    this builder

    Parameters

    • value: number | boolean

      bit to write, true or positive number for 1, false or zero or negative for 0

    Returns Builder

  • Write bits from BitString

    Returns

    this builder

    Parameters

    Returns Builder

  • Store Buffer

    Returns

    this builder

    Parameters

    • src: Buffer

      source buffer

    Returns Builder

  • Store builder

    Returns

    this builder

    Parameters

    Returns Builder

  • Store coins value

    Returns

    this builder

    Parameters

    • amount: number | bigint

      amount of coins

    Returns Builder

  • Store dictionary in this builder

    Returns

    this builder

    Type Parameters

    • K

    • V

    Parameters

    • Optional dict: Maybe<Dictionary<K, V>>

      dictionary to store

    Returns Builder

  • Store dictionary in this builder directly

    Returns

    this builder

    Type Parameters

    • K

    • V

    Parameters

    Returns Builder

  • Store int value

    Returns

    this builder

    Parameters

    • value: number | bigint

      value as bigint or number

    • bits: number

      number of bits to write

    Returns Builder

  • Store builder if not null

    Returns

    this builder

    Parameters

    • Optional src: Maybe<Builder>

      builder to store

    Returns Builder

  • Store maybe coins value

    Returns

    this builder

    Parameters

    • amount: Maybe<number | bigint>

      amount of coins, null or undefined

    Returns Builder

  • Store maybe int value

    Returns

    this builder

    Parameters

    • value: Maybe<number | bigint>

      value as bigint or number, null or undefined

    • bits: number

      number of bits to write

    Returns Builder

  • Store reference if not null

    Returns

    this builder

    Parameters

    • Optional cell: Maybe<Cell | Builder>

      cell or builder to store

    Returns Builder

  • Store slice in this builder if not null

    Parameters

    • Optional src: Maybe<Slice>

      source slice

    Returns Builder

  • Store maybe string tail in ref

    Returns

    this builder

    Parameters

    • Optional src: Maybe<null | string>

      source string

    Returns Builder

  • Store string tail

    Returns

    this builder

    Parameters

    • Optional src: Maybe<string>

      source string

    Returns Builder

  • Store maybe uint value

    Returns

    this builder

    Parameters

    • value: Maybe<number | bigint>

      value as bigint or number, null or undefined

    • bits: number

      number of bits to write

    Returns Builder

  • Store maybe varint value

    Returns

    this builder

    Parameters

    • value: Maybe<number | bigint>

      value as bigint or number, null or undefined

    • bits: number

      number of bits to write to header

    Returns Builder

  • Store maybe varuint value

    Returns

    this builder

    Parameters

    • value: Maybe<number | bigint>

      value as bigint or number, null or undefined

    • bits: number

      number of bits to write to header

    Returns Builder

  • Store writer or builder if not null

    Returns

    this builder

    Parameters

    • Optional writer: Maybe<Writable | ((builder: Builder) => void)>

      writer or builder to store

    Returns Builder

  • Store reference

    Returns

    this builder

    Parameters

    Returns Builder

  • Store slice it in this builder

    Parameters

    • src: Slice

      source slice

    Returns Builder

  • Store string tail in ref

    Returns

    this builder

    Parameters

    • src: string

      source string

    Returns Builder

  • Store string tail

    Returns

    this builder

    Parameters

    • src: string

      source string

    Returns Builder

  • Store uint value

    Returns

    this builder

    Parameters

    • value: number | bigint

      value as bigint or number

    • bits: number

      number of bits to write

    Returns Builder

  • Store varint value

    Returns

    this builder

    Parameters

    • value: number | bigint

      value as bigint or number

    • bits: number

      number of bits to write to header

    Returns Builder

  • Store varuint value

    Returns

    this builder

    Parameters

    • value: number | bigint

      value as bigint or number

    • bits: number

      number of bits to write to header

    Returns Builder

  • Store writer or builder

    Returns

    this builder

    Parameters

    • writer: Writable | ((builder: Builder) => void)

      writer or builder to store

    Returns Builder

Generated using TypeDoc