export class MerkleTreeLeafNode {
    /**
    * @param {ID} id
    * @param {Array<{
    *   struct: Item,
    *   hash?: string
    * }>} targets
    * @param {{
    *   leafNodeList: MerkleTreeLeafNodeList,
    *   layerNodeList: MerkleTreeLayerNodeList,
    *   merkleTreeRoot: MerkleTreeHashNode | null | undefined,
    * }} store
    */
    constructor(id: ID, targets: Array<{
        struct: Item;
        hash?: string;
    }>, store: {
        leafNodeList: MerkleTreeLeafNodeList;
        layerNodeList: MerkleTreeLayerNodeList;
        merkleTreeRoot: MerkleTreeHashNode | null | undefined;
    });
    /**
     * leafNode所对应的client
     */
    client: number;
    /**
     * leafNode搜索对应的clock
     */
    clock: number;
    /**
     * targets首先需要按照hash进行排序，从小到大排序
     * @type {Array<{
    *   struct: Item,
    *   hash?: string
    * }>}
    */
    targets: {
        struct: Item;
        hash?: string | undefined;
    }[];
    /**
     * 所对应的byzantine client store
     */
    store: {
        leafNodeList: MerkleTreeLeafNodeList;
        layerNodeList: MerkleTreeLayerNodeList;
        merkleTreeRoot: MerkleTreeHashNode | null | undefined;
    };
    /**
     * @type {MerkleTreeHashNode | MerkleTreeLeafNode | null | undefined}
     */
    parent: MerkleTreeHashNode | MerkleTreeLeafNode | null | undefined;
    /**
     * 所绑定的hash
     * @type {string}
     */
    hash: string;
    /**
     * @type {string}
     */
    _fhash: string;
    get fHash(): string;
    /**
     *
     * @param {{
     *   struct: Item,
     *   hash?: string
     * }} target
     */
    addTarget(target: {
        struct: Item;
        hash?: string | undefined;
    }): void;
    /**
     *
     * @param {Item} struct
     * @param {Item} newStruct
     */
    replaceTargetStruct(struct: Item, newStruct: Item): void;
    /**
     * 获得某一个target的hash
     * @param {{
     *  struct: Item,
     *  hash?: string
     * }} target
     * @returns {string}
     */
    getTargetHash(target: {
        struct: Item;
        hash?: string | undefined;
    }): string;
    /**
     * 更新hash
     */
    updateHash(): string;
}
import { Item } from "../../structs/Item";
import { MerkleTreeLeafNodeList } from "./LeafNodeList";
import { MerkleTreeLayerNodeList } from "./LayerNodeList";
import { MerkleTreeHashNode } from "./HashNode";
import { ID } from "../../utils/ID";
