import { Node } from "@chainsafe/persistent-merkle-tree"; import { Require } from "../util/types.ts"; import { ValueOfFields } from "../view/container.ts"; import { ByteViews, Type } from "./abstract.ts"; import { ContainerOptions, ContainerType } from "./container.ts"; /** * ContainerNodeStruct: ordered heterogeneous collection of values. * - Notation: Custom name per instance * * A ContainerNodeStruct is identical to a Container type except that it represents tree data with a custom * BranchNodeStruct node. This special branch node represents the data of its entire sub tree as a value, instead * of a tree of nodes. This approach is a tradeoff: * * - More memory efficient * - Faster reads, since it doesn't require parsing merkleized data * - Slower hashing, since it has to merkleize the entire value everytime and has not intermediary hashing cache * * This tradeoff is good for data that is read often, written rarely, and consumes a lot of memory (i.e. Validator) */ export declare class ContainerNodeStructType>> extends ContainerType { readonly fields: Fields; constructor(fields: Fields, opts?: ContainerOptions); static named>>(fields: Fields, opts: Require, "typeName">): ContainerType; tree_serializedSize(node: Node): number; tree_serializeToBytes(output: ByteViews, offset: number, node: Node): number; tree_deserializeFromBytes(data: ByteViews, start: number, end: number): Node; getPropertyGindex(): null; tree_fromProofNode(node: Node): { node: Node; done: boolean; }; tree_toValue(node: Node): ValueOfFields; value_toTree(value: ValueOfFields): Node; private valueToTree; }