Skip to content
This repository was archived by the owner on Aug 11, 2024. It is now read-only.

Latest commit

 

History

History
124 lines (71 loc) · 2.02 KB

BOC.md

File metadata and controls

124 lines (71 loc) · 2.02 KB

ton3-core / BOC

Class: BOC

Bag Of Cells

Table of contents

Constructors

Methods

Accessors

Constructors

constructor

new BOC(cells)

Creates an instance of BOC, containing up to 4 root Cell list

example

import { BOC, Builder } from 'ton3-core'

const cell = new Builder().cell()
const boc = new BOC([ cell ])

Parameters

Name Type Description
cells Cell[] BOC root Cell list

Methods

[iterator]

[iterator](): IterableIterator<Cell>

Returns

IterableIterator<Cell>


from

Static from(data, checkMerkleProofs?): BOC

Returns deserialized BOC.

static

Parameters

Name Type Default value Description
data string | Uint8Array undefined Bytes, Hex, Base64 or FiftHex of serialized BOC.
checkMerkleProofs boolean false -

Returns

BOC


toBytes

toBytes(options?): Uint8Array

Returns serialized BOC in bytes representation.

Parameters

Name Type
options? BOCOptions

Returns

Uint8Array


toString

toString(encoding?, options?): string

Returns serialized BOC in Base64, Hex or FiftHex representation.

Parameters

Name Type Default value
encoding BOCEncoding 'hex'
options? BOCOptions undefined

Returns

string

Accessors

root

get root(): Cell[]

Returns BOC root Cell list

Returns

Cell[]