"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.signOevReq = exports.httpSignedReq = exports.httpReq = exports.run = exports.startCoordinator = void 0;
const cloudProvider = process.env.AIRNODE_CLOUD_PROVIDER;
if (!cloudProvider) {
    throw new Error('Missing cloud specification');
}
function cloudHandler() {
    return Promise.resolve(`${`./handlers/${cloudProvider}`}`).then(s => __importStar(require(s)));
}
async function startCoordinator(...args) {
    const handler = await cloudHandler();
    return handler.startCoordinator(...args);
}
exports.startCoordinator = startCoordinator;
async function run(...args) {
    const handler = await cloudHandler();
    return handler.run(...args);
}
exports.run = run;
// We shorten function name to allow for shorter cloud resource names
async function httpReq(...args) {
    const handler = await cloudHandler();
    return handler.processHttpRequest(...args);
}
exports.httpReq = httpReq;
// We shorten function name to allow for shorter cloud resource names
async function httpSignedReq(...args) {
    const handler = await cloudHandler();
    return handler.processHttpSignedDataRequest(...args);
}
exports.httpSignedReq = httpSignedReq;
// We shorten function name to allow for shorter cloud resource names
async function signOevReq(...args) {
    const handler = await cloudHandler();
    return handler.processSignOevDataRequest(...args);
}
exports.signOevReq = signOevReq;
//# sourceMappingURL=entrypoint.js.map