import { EntryTag } from '../entry/constants.js'; import { Encoded, Encoding } from '../../../utils/encoder.js'; import type { unpackEntry } from '../entry/index.js'; import type { EntUnpacked } from '../entry/schema.generated.js'; type MPTreeBinary = [Buffer, Array<[Buffer, Buffer[]]>]; declare class MPTree { #private; get isComplete(): boolean; /** * Deserialize Merkle Patricia Tree * @param binary - Binary * @param tag - Tag to use to decode value * @param unpEnt - Implementation of unpackEntry use to decode values * @returns Merkle Patricia Tree */ constructor(binary: MPTreeBinary, encoding: E, tag: T, unpEnt: typeof unpackEntry); isEqual(tree: MPTree): boolean; /** * Serialize Merkle Patricia Tree * @returns Binary */ serialize(): MPTreeBinary; /** * Retrieve value from Merkle Patricia Tree * @param key - The key of the element to retrieve * @returns Value associated to the specified key */ get(key: Encoded.Generic): (EntUnpacked & { tag: T; }) | undefined; toObject(): Record, EntUnpacked & { tag: T; }>; } export default function genMPTreeField(encoding: E, tag: T): { serialize: (value: MPTree) => MPTreeBinary; deserialize: (value: MPTreeBinary, o: { unpackEntry: typeof unpackEntry; }) => MPTree; }; export {};