"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BCHStateProvider = void 0;
const cache_1 = require("../../../models/cache");
const btc_1 = require("../btc/btc");
class BCHStateProvider extends btc_1.BTCStateProvider {
    constructor(chain = 'BCH') {
        super(chain);
    }
    async getFee(params) {
        const { chain, network } = params;
        const cacheKey = `getFee-${chain}-${network}`;
        return cache_1.CacheStorage.getGlobalOrRefresh(cacheKey, async () => {
            return { feerate: await this.getRPC(chain, network).getEstimateFee() };
        }, 30 * cache_1.CacheStorage.Times.Minute);
    }
}
exports.BCHStateProvider = BCHStateProvider;
//# sourceMappingURL=bch.js.map