"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const cache_1 = require("../../../src/models/cache");
const chain_state_1 = require("../../../src/providers/chain-state");
const integration_1 = require("../../helpers/integration");
describe('Bitcoin API', function () {
    // eslint-disable-next-line @typescript-eslint/no-this-alias
    const suite = this;
    this.timeout(30000);
    before(integration_1.intBeforeHelper);
    after(async () => (0, integration_1.intAfterHelper)(suite));
    it('should be able to get the fees', async () => {
        const chain = 'BTC';
        const network = 'regtest';
        const target = 1;
        const cacheKey = `getFee-${chain}-${network}-${target}`;
        const fee = await chain_state_1.ChainStateProvider.getFee({ chain, network, target });
        (0, chai_1.expect)(fee).to.exist;
        const cached = await cache_1.CacheStorage.getGlobal(cacheKey);
        (0, chai_1.expect)(fee).to.deep.eq(cached);
    });
});
//# sourceMappingURL=csp.test.js.map