/**
 * Default trust-crypto helpers for signed trust record verification.
 *
 * This module lazily loads the infrastructure trust-crypto adapter so core
 * trust services can use a default implementation without importing `node:*`
 * directly.
 *
 * @module domain/utils/defaultTrustCrypto
 */
import TrustError from "../errors/TrustError.js";
const UNAVAILABLE_MESSAGE = 'No trust crypto available. Inject trust crypto explicitly.';
let _impl = null;
try {
    const mod = await import("../../infrastructure/adapters/TrustCryptoAdapter.js");
    _impl = {
        verifySignature: mod.verifySignature,
        computeKeyFingerprint: mod.computeKeyFingerprint,
    };
}
catch {
    // Unsupported runtime or bundler stub — caller must inject helpers.
}
function requireImpl() {
    if (_impl === null) {
        throw new TrustError(UNAVAILABLE_MESSAGE);
    }
    return _impl;
}
function verifySignature(params) {
    return requireImpl().verifySignature(params);
}
function computeKeyFingerprint(publicKeyBase64) {
    return requireImpl().computeKeyFingerprint(publicKeyBase64);
}
export default {
    verifySignature,
    computeKeyFingerprint,
};
