ton_lib_core 0.0.7

A collection of types and utilities for interacting with the TON network
Documentation
mod from_bytes;
mod from_ton_cells;
mod into_ton_cells;
mod to_bytes;

use crate::cell::CellType;
use crate::cell::LevelMask;

pub const GENERIC_BOC_MAGIC: u32 = 0xb5ee9c72;
/// `cells` must be topologically sorted.
#[derive(PartialEq, Debug, Clone)]
pub struct BOCRaw {
    pub cells: Vec<CellRaw>,
    pub roots_position: Vec<usize>,
}

/// References are stored as indices in BagOfCells.
#[derive(PartialEq, Debug, Clone)]
pub struct CellRaw {
    pub cell_type: CellType,
    pub data: Vec<u8>,
    pub data_bits_len: usize,
    pub refs_positions: Vec<usize>,
    pub level_mask: LevelMask,
}