"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildMerkleRoot = void 0;
exports.paymentLeafHash = paymentLeafHash;
exports.merkleProofs = merkleProofs;
const checkpoint_core_1 = require("@dbis/checkpoint-core");
Object.defineProperty(exports, "buildMerkleRoot", { enumerable: true, get: function () { return checkpoint_core_1.buildMerkleRoot; } });
function paymentLeafHash(chainId, leaf) {
    return (0, checkpoint_core_1.paymentLeafV1Hash)(chainId, {
        txHash: String(leaf.txHash),
        from: String(leaf.from),
        to: String(leaf.to),
        value: (0, checkpoint_core_1.merkleVerifyValueWei)(leaf),
        blockNumber: leaf.blockNumber,
        blockTimestamp: leaf.blockTimestamp,
        gasUsed: leaf.gasUsed,
        success: leaf.success,
    });
}
function merkleProofs(hashes) {
    return (0, checkpoint_core_1.merkleProofs)(hashes);
}
