"use strict";
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2024-2026 Gracker (Chris)
// This file is part of SmartPerfetto. See LICENSE for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeSparkProvenance = makeSparkProvenance;
exports.isUnsupported = isUnsupported;
// =============================================================================
// Helpers
// =============================================================================
/** Build a fresh provenance block for new contract objects. */
function makeSparkProvenance(opts) {
    return {
        schemaVersion: opts.schemaVersion ?? 1,
        source: opts.source,
        createdAt: Date.now(),
        ...(opts.unsupportedReason ? { unsupportedReason: opts.unsupportedReason } : {}),
        ...(opts.notes ? { notes: opts.notes } : {}),
    };
}
/** Quick guard for "did the producer flag this contract as unsupported?". */
function isUnsupported(contract) {
    return Boolean(contract.unsupportedReason);
}
//# sourceMappingURL=sparkContracts.js.map