"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isEvmNativeAvailable = exports.getEvmNativeLoadError = exports.getEvmNativeBindings = exports.setEvmNativeLoadError = exports.setEvmNativeBindings = void 0;
let bindings;
let loadError;
function setEvmNativeBindings(next) {
    bindings = next;
    loadError = undefined;
}
exports.setEvmNativeBindings = setEvmNativeBindings;
function setEvmNativeLoadError(error) {
    bindings = undefined;
    loadError = error;
}
exports.setEvmNativeLoadError = setEvmNativeLoadError;
function getEvmNativeBindings() {
    return bindings;
}
exports.getEvmNativeBindings = getEvmNativeBindings;
function getEvmNativeLoadError() {
    return loadError;
}
exports.getEvmNativeLoadError = getEvmNativeLoadError;
function isEvmNativeAvailable() {
    return Boolean(bindings?.NativeBlocksQueue && bindings?.NativeEvmMempoolState);
}
exports.isEvmNativeAvailable = isEvmNativeAvailable;
