Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CellDescriptorSize is the fixed size of a cell descriptor in the BOC payload. // A cell descriptor consists of 2 bytes: // - Byte 0: d1 (refs_descriptor) = refs_num(3 bits) | special(1 bit) | withHashes(1 bit) | levelMask(3 bits) // - Byte 1: d2 (data_descriptor) = data length in half-bytes (4-bit units), range 0-255 // // Reference: tonutils-go/tvm/cell/parse.go:129-145 CellDescriptorSize = 2 )
Variables ¶
This section is empty.
Functions ¶
func HeaderLen ¶
HeaderLen calculates the header length of a BOC based on its structure.
BOC header structure:
magic(4) + flags(1) + sizeBytes(1) + cellsNum(cellSizeBytes) + rootsNum(cellSizeBytes) + completeNum(cellSizeBytes) + dataLen(sizeBytes) + rootIndices(rootsNum × cellSizeBytes) + [optional] index(cellsNum × sizeBytes, if hasIndex=true)
Reference: tonutils-go/tvm/cell/parse.go:32-88
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.