"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCID = void 0;
const tslib_1 = require("tslib");
const constants_1 = require("../constants");
const helpers_1 = require("../helpers");
const axiosUtil_1 = require("../utils/axiosUtil");
function getCID(cid, options) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        const { env = constants_1.default.ENV.PROD } = options || {};
        const API_BASE_URL = (0, helpers_1.getAPIBaseUrls)(env);
        const apiEndpoint = `${API_BASE_URL}/v1/ipfs/${cid}`;
        try {
            const response = yield (0, axiosUtil_1.axiosGet)(apiEndpoint);
            const message = response.data;
            return message;
        }
        catch (err) {
            throw Error(`[Push SDK] - API ${getCID.name}: ${err}`);
        }
    });
}
exports.getCID = getCID;
//# sourceMappingURL=ipfs.js.map