"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const src_1 = require("../../src");
const testUtils_1 = require("../testUtils");
const BtcMccConnection = {
    apiTokenKey: process.env.FLARE_API_PORTAL_KEY || "",
    url: process.env.BTC_URL || "",
    username: process.env.BTC_USERNAME || "",
    password: process.env.BTC_PASSWORD || "",
    rateLimitOptions: {
        timeoutMs: 15000,
    },
};
describe(`Block BTC base test ,(${(0, testUtils_1.getTestFile)(__filename)})`, function () {
    let MccClient;
    let status;
    before(async function () {
        MccClient = new src_1.MCC.BTC(BtcMccConnection);
        const tstatus = await MccClient.getNodeStatus();
        if (tstatus) {
            status = tstatus;
        }
    });
    it("Should get status version ", async function () {
        const version = status.version.split("_");
        (0, chai_1.expect)(version[0]).to.be.oneOf(["230000", "240001", "250000"]);
    });
    it("Should get status state ", async function () {
        (0, chai_1.expect)(status.state).to.be.eq("full");
    });
    it("Should get status isHealthy ", async function () {
        (0, chai_1.expect)(status.isHealthy).to.eq(true);
    });
    it("Should get status isSynced ", async function () {
        (0, chai_1.expect)(status.isSynced).to.eq(true);
    });
});
describe("BTC bottom block ", function () {
    let MccClient;
    before(async function () {
        MccClient = new src_1.MCC.BTC(BtcMccConnection);
    });
    it("Should get status version ", async function () {
        const bottom = await MccClient.getBottomBlockHeight();
        (0, chai_1.expect)(bottom).to.eq(0);
    });
});
//# sourceMappingURL=status.test.js.map